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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user