Explorar o código

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

Evan You %!s(int64=10) %!d(string=hai) anos
pai
achega
20deeee51c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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] ||