Browse Source

ensure id is string when resolving asset (fix #2254)

Evan You 10 years ago
parent
commit
20deeee51c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/util/options.js

+ 4 - 0
src/util/options.js

@@ -359,6 +359,10 @@ export function mergeOptions (parent, child, vm) {
  */
 
 export function resolveAsset (options, type, id) {
+  /* istanbul ignore if */
+  if (typeof id !== 'string') {
+    return
+  }
   var assets = options[type]
   var camelizedId
   return assets[id] ||