From 014c51d1e7f2ba0b546c5000ce8755a3db9b9f44 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 26 Oct 2017 12:16:54 -0400 Subject: [PATCH] Stylistic changes to getOptionLabel() default console.warn Split into multiple lines, included stringified defective option object. --- src/components/Select.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index 430723f..dc5f3ff 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -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]