Explorar el Código

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

Evan You hace 10 años
padre
commit
20deeee51c
Se han modificado 1 ficheros con 4 adiciones y 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] ||