diff --git a/node_modules/alpaca/dist/alpaca/jqueryui/alpaca.js b/node_modules/alpaca/dist/alpaca/jqueryui/alpaca.js index fd07ea2..3a76d91 100644 --- a/node_modules/alpaca/dist/alpaca/jqueryui/alpaca.js +++ b/node_modules/alpaca/dist/alpaca/jqueryui/alpaca.js @@ -24914,7 +24914,7 @@ this["HandlebarsPrecompiled"]["web-edit"]["wizard"] = Handlebars.template({"1":f } else { - var text = map[model.data.value]; + var text = model.data && map[model.data.value]; if (text) { displayableTexts.push(text); @@ -24933,26 +24933,29 @@ this["HandlebarsPrecompiled"]["web-edit"]["wizard"] = Handlebars.template({"1":f var completionFn = function() { - for (var i = 0; i < self.selectOptions.length; i++) + if (self.data && self.data.length > 0) { - for (var j = 0; j < self.data.length; j++) + for (var i = 0; i < self.selectOptions.length; i++) { - if (self.data[j].value === self.selectOptions[i].value) + for (var j = 0; j < self.data.length; j++) { - self.selectOptions[i].selected = true; + if (self.data[j].value === self.selectOptions[i].value) + { + self.selectOptions[i].selected = true; + } } } } // if emptySelectFirst and we have options but no data, then auto-select first item in the options list - if (self.data.length === 0 && self.options.emptySelectFirst && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.options.emptySelectFirst && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; } // likewise, we auto-assign first pick if field required - if (self.data.length === 0 && self.isRequired() && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.isRequired() && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; diff --git a/node_modules/alpaca/dist/alpaca/bootstrap/alpaca.js b/node_modules/alpaca/dist/alpaca/bootstrap/alpaca.js index 8b4cf97..3936a85 100644 --- a/node_modules/alpaca/dist/alpaca/bootstrap/alpaca.js +++ b/node_modules/alpaca/dist/alpaca/bootstrap/alpaca.js @@ -25822,7 +25822,7 @@ this["HandlebarsPrecompiled"]["bootstrap-edit"]["message"] = Handlebars.template } else { - var text = map[model.data.value]; + var text = model.data && map[model.data.value]; if (text) { displayableTexts.push(text); @@ -25841,26 +25841,29 @@ this["HandlebarsPrecompiled"]["bootstrap-edit"]["message"] = Handlebars.template var completionFn = function() { - for (var i = 0; i < self.selectOptions.length; i++) + if (self.data && self.data.length > 0) { - for (var j = 0; j < self.data.length; j++) + for (var i = 0; i < self.selectOptions.length; i++) { - if (self.data[j].value === self.selectOptions[i].value) + for (var j = 0; j < self.data.length; j++) { - self.selectOptions[i].selected = true; + if (self.data[j].value === self.selectOptions[i].value) + { + self.selectOptions[i].selected = true; + } } } } // if emptySelectFirst and we have options but no data, then auto-select first item in the options list - if (self.data.length === 0 && self.options.emptySelectFirst && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.options.emptySelectFirst && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; } // likewise, we auto-assign first pick if field required - if (self.data.length === 0 && self.isRequired() && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.isRequired() && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; diff --git a/node_modules/alpaca/dist/alpaca/jquerymobile/alpaca.js b/node_modules/alpaca/dist/alpaca/jquerymobile/alpaca.js index 7ca2029..097cab4 100644 --- a/node_modules/alpaca/dist/alpaca/jquerymobile/alpaca.js +++ b/node_modules/alpaca/dist/alpaca/jquerymobile/alpaca.js @@ -25445,7 +25445,7 @@ this["HandlebarsPrecompiled"]["jquerymobile-edit"]["message"] = Handlebars.templ } else { - var text = map[model.data.value]; + var text = model.data && map[model.data.value]; if (text) { displayableTexts.push(text); @@ -25464,26 +25464,29 @@ this["HandlebarsPrecompiled"]["jquerymobile-edit"]["message"] = Handlebars.templ var completionFn = function() { - for (var i = 0; i < self.selectOptions.length; i++) + if (self.data && self.data.length > 0) { - for (var j = 0; j < self.data.length; j++) + for (var i = 0; i < self.selectOptions.length; i++) { - if (self.data[j].value === self.selectOptions[i].value) + for (var j = 0; j < self.data.length; j++) { - self.selectOptions[i].selected = true; + if (self.data[j].value === self.selectOptions[i].value) + { + self.selectOptions[i].selected = true; + } } } } // if emptySelectFirst and we have options but no data, then auto-select first item in the options list - if (self.data.length === 0 && self.options.emptySelectFirst && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.options.emptySelectFirst && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; } // likewise, we auto-assign first pick if field required - if (self.data.length === 0 && self.isRequired() && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.isRequired() && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; diff --git a/node_modules/alpaca/dist/alpaca/web/alpaca.js b/node_modules/alpaca/dist/alpaca/web/alpaca.js index 5f93896..45daaf7 100644 --- a/node_modules/alpaca/dist/alpaca/web/alpaca.js +++ b/node_modules/alpaca/dist/alpaca/web/alpaca.js @@ -24914,7 +24914,7 @@ this["HandlebarsPrecompiled"]["web-edit"]["wizard"] = Handlebars.template({"1":f } else { - var text = map[model.data.value]; + var text = model.data && map[model.data.value]; if (text) { displayableTexts.push(text); @@ -24933,26 +24933,29 @@ this["HandlebarsPrecompiled"]["web-edit"]["wizard"] = Handlebars.template({"1":f var completionFn = function() { - for (var i = 0; i < self.selectOptions.length; i++) + if (self.data && self.data.length > 0) { - for (var j = 0; j < self.data.length; j++) + for (var i = 0; i < self.selectOptions.length; i++) { - if (self.data[j].value === self.selectOptions[i].value) + for (var j = 0; j < self.data.length; j++) { - self.selectOptions[i].selected = true; + if (self.data[j].value === self.selectOptions[i].value) + { + self.selectOptions[i].selected = true; + } } } } // if emptySelectFirst and we have options but no data, then auto-select first item in the options list - if (self.data.length === 0 && self.options.emptySelectFirst && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.options.emptySelectFirst && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]]; } // likewise, we auto-assign first pick if field required - if (self.data.length === 0 && self.isRequired() && self.selectOptions.length > 0) + if ((!self.data || self.data.length === 0) && self.isRequired() && self.selectOptions.length > 0) { self.selectOptions[0].selected = true; self.data = [self.selectOptions[0]];