]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: properly check for "undefined" as type 11594/head
authorDaniel Ruf <daniel.ruf@ueberbit.de>
Mon, 19 Nov 2018 07:53:51 +0000 (08:53 +0100)
committerDaniel Ruf <daniel.ruf@ueberbit.de>
Mon, 19 Nov 2018 07:53:51 +0000 (08:53 +0100)
js/foundation.interchange.js

index 8f91b6bed71d268b2b5aa55ec386554401006d84..fcdd54c3fc141fce0a7764e85f78eee1307f7cf7 100644 (file)
@@ -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"`);