From: Daniel Ruf Date: Mon, 19 Nov 2018 07:53:51 +0000 (+0100) Subject: fix: properly check for "undefined" as type X-Git-Tag: v6.6.0~3^2~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11594%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: properly check for "undefined" as type --- diff --git a/js/foundation.interchange.js b/js/foundation.interchange.js index 8f91b6bed..fcdd54c3f 100644 --- a/js/foundation.interchange.js +++ b/js/foundation.interchange.js @@ -92,7 +92,7 @@ class Interchange extends Plugin { */ _parseOptions() { var types = ['auto', 'src', 'background', 'html']; - if (typeof this.options.type === undefined) + if (typeof this.options.type === 'undefined') this.options.type = 'auto'; else if (types.indexOf(this.options.type) === -1) { console.log(`Warning: invalid value "${this.options.type}" for Interchange option "type"`);