vendor/assets/javascripts/xooie/xooie.js in xooie-1.0.5 vs vendor/assets/javascripts/xooie/xooie.js in xooie-1.0.6
- old
+ new
@@ -155,11 +155,11 @@
// Iterate through each item in the collection:
for (i = 0; i < nodes.length; i += 1) {
node = $(nodes[i]);
// Add all of the widget types to the list of modules we need:
- moduleNames = helpers.toAry(node.data(widgetDataAttr));
+ moduleNames = helpers.toArray(node.data(widgetDataAttr));
// For each widget we check to see if the url is already in our
// list of urls to require:
for (j = 0; j < moduleNames.length; j += 1) {
url = $X._mapName(moduleNames[j], 'widgets');
@@ -168,11 +168,11 @@
moduleUrls.push(url);
}
}
// Do the same with each addon name:
- moduleNames = helpers.toAry(node.data(addonDataAttr)) || [];
+ moduleNames = helpers.toArray(node.data(addonDataAttr)) || [];
for (j = 0; j < moduleNames.length; j += 1) {
url = $X._mapName(moduleNames[j], 'addons');
if (moduleUrls.indexOf(url) === -1) {
@@ -190,11 +190,11 @@
// We need to iterate through our collection of nodes again:
for (i = 0; i < nodes.length; i += 1) {
node = $(nodes[i]);
// This time, we're keeping track of our addons and widges separately:
- widgets = helpers.toAry(node.data(widgetDataAttr));
- addons = helpers.toAry(node.data(addonDataAttr)) || [];
+ widgets = helpers.toArray(node.data(widgetDataAttr));
+ addons = helpers.toArray(node.data(addonDataAttr)) || [];
// Iterate through each widget type:
for (j = 0; j < widgets.length; j += 1) {
// Get the index of this module from the moduleUrls:
\ No newline at end of file