From: Jörn Röder Date: Tue, 3 Jan 2017 14:54:26 +0000 (+0100) Subject: fixed programmatic use of interchange. see #9332 X-Git-Tag: v6.3.1-rc1~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9589%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fixed programmatic use of interchange. see #9332 --- diff --git a/js/foundation.interchange.js b/js/foundation.interchange.js index b43fe93ec..06d4ff702 100644 --- a/js/foundation.interchange.js +++ b/js/foundation.interchange.js @@ -103,8 +103,10 @@ class Interchange { rules = this.options.rules; } else { - rules = this.$element.data('interchange').match(/\[.*?\]/g); + rules = this.$element.data('interchange'); } + + rules = typeof rules === 'string' ? rules.match(/\[.*?\]/g) : rules; for (var i in rules) { if(rules.hasOwnProperty(i)) {