Skip to content

Commit 1387f2b

Browse files
committed
When an observable value is updated, ensure that we only read the inputProp off of an object.
1 parent 7a086e1 commit 1387f2b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

build/knockout-jqAutocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// knockout-jqAutocomplete 0.4.0 | (c) 2015 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
1+
// knockout-jqAutocomplete 0.4.1 | (c) 2015 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
22
;(function(factory) {
33
if (typeof define === "function" && define.amd) {
44
// AMD anonymous module
@@ -110,7 +110,7 @@
110110
) || value;
111111
}
112112

113-
if (propNames.input) {
113+
if (propNames.input && value && typeof value === "object") {
114114
element.value = value[propNames.input];
115115
}
116116
else {

build/knockout-jqAutocomplete.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "knockout-jqAutocomplete",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"devDependencies": {
55
"grunt": "~0.4.1",
66
"grunt-contrib-uglify": "0.x.x",

src/knockout-jqAutocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
) || value;
110110
}
111111

112-
if (propNames.input) {
112+
if (propNames.input && value && typeof value === "object") {
113113
element.value = value[propNames.input];
114114
}
115115
else {

0 commit comments

Comments
 (0)