From: Moritz Warning Date: Mon, 1 Jun 2020 20:27:08 +0000 (+0200) Subject: add default values for a better experience X-Git-Tag: v2.2.1~18 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=813a59473cb73309125a336cda684a2027233e2f;p=web%2Ffirmware-selector-openwrt-org.git add default values for a better experience --- diff --git a/index.js b/index.js index 92fb993..894f1a1 100644 --- a/index.js +++ b/index.js @@ -353,8 +353,8 @@ function init() { data.json().then(obj => { setupAutocompleteList($('models'), Object.keys(obj['models']), model => { if (model in obj['models']) { - var url = obj.url; - var code = obj.version_code; + var url = obj.url || 'unknown'; + var code = obj.version_code || 'unknown'; var date = obj.build_data || 'unknown'; var mobj = obj['models'][model]; updateImages(version, code, date, model, url, mobj, false);