2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-04 06:32:23 +03:00

Move console warning

This commit is contained in:
Simone Todaro
2018-01-17 22:08:35 +00:00
parent 852890fe2c
commit f5557bcd78
+10 -6
View File
@@ -527,6 +527,16 @@
'http://sagalbot.github.io/vue-select/#ex-labels'
)
}
if(this.index) {
if (!option.hasOwnProperty(this.index)) {
console.warn(
`[vue-select warn]: Index key "option.${this.index}" does not` +
` exist in options object ${JSON.stringify(option)}.`
)
}
}
if (this.label && option[this.label]) {
return option[this.label]
}
@@ -785,12 +795,6 @@
option = this.createOption(option)
}
if(this.index) {
if (!option.hasOwnProperty(this.index)) {
console.warn(
`[vue-select warn]: Index key "option.${this.index}" does not` +
` exist in options object ${JSON.stringify(option)}.`
)
}
option = option[this.index]
}
if (this.multiple && !this.mutableValue) {