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

Stylistic changes to getOptionLabel() default console.warn

Split into multiple lines, included stringified defective option object.
This commit is contained in:
Unknown
2017-10-26 12:16:54 -04:00
parent 9a74882904
commit 014c51d1e7
+5 -1
View File
@@ -470,7 +470,11 @@
default(option) {
if (typeof option === 'object') {
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]) {
return option[this.label]