mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
Stylistic changes to getOptionLabel() default console.warn
Split into multiple lines, included stringified defective option object.
This commit is contained in:
@@ -470,7 +470,11 @@
|
|||||||
default(option) {
|
default(option) {
|
||||||
if (typeof option === 'object') {
|
if (typeof option === 'object') {
|
||||||
if (!option.hasOwnProperty(this.label)) {
|
if (!option.hasOwnProperty(this.label)) {
|
||||||
return console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object.\nhttp://sagalbot.github.io/vue-select/#ex-labels`)
|
return console.warn(
|
||||||
|
`[vue-select warn]: Label key "option.${this.label}" does not` +
|
||||||
|
` exist in options object ${JSON.stringify(option)}.\n` +
|
||||||
|
'http://sagalbot.github.io/vue-select/#ex-labels'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (this.label && option[this.label]) {
|
if (this.label && option[this.label]) {
|
||||||
return option[this.label]
|
return option[this.label]
|
||||||
|
|||||||
Reference in New Issue
Block a user