Commit 2256fb5f authored by Mikaël Salson's avatar Mikaël Salson

main.js: Use config.available_tips only if defined

Without any conf.js the tips should be displayed (it was at least the intended behaviour).
parent 787e5bd1
Pipeline #10942 failed with stages
in 2 minutes and 51 seconds
......@@ -94,7 +94,10 @@ try {
new VidjilAutoComplete(db);
var my_tips = new TipsOfTheDay(tips, new TipDecorator(), config.available_tips);
var available_tips;
if (typeof config !== 'undefined')
available_tips = config.available_tips;
var my_tips = new TipsOfTheDay(tips, new TipDecorator(), available_tips);
my_tips.set_container(document.getElementById('tip-container'))
my_tips.display()
} catch(err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment