From 2277880831f3b68cae27db414951cf8936f6ad37 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Wed, 3 Jul 2013 13:35:09 +0000 Subject: [PATCH] JS nightmare with undefined check --- experiments/spclient/mkws.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 7897f96..3cc2794 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -509,18 +509,18 @@ function mkws_html_all(config) { lang_menu: true, /* show/hide language menu */ lang_display: [], /* display languages links for given languages, [] for all */ facets: ["sources", "subjects", "authors"], /* display facets, in this order, [] for none */ - responsive_design_width: 980, /* a page with less pixel width considered as mobile */ + responsive_design_width: 980, /* a page with less pixel width considered as mobile */ - debug: 0, /* debug level for development: 0..2 */ + debug: 1, /* debug level for development: 0..2 */ dummy: "dummy" }; /* set global debug flag early */ - if (config.debug !== 'undefined') { + if (typeof config.debug !== 'undefined') { mkws_debug = config.debug; - } else if (mkws_config_default.debug !== 'undefined') { + } else if (typeof mkws_config_default.debug !== 'undefined') { mkws_debug = mkws_config_default.debug; } -- 1.7.10.4