Skip to content

Commit 57852b5

Browse files
committed
tweak resolveAsset function
1 parent 4e3fb0d commit 57852b5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/util/options.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,11 @@ exports.mergeOptions = function merge (parent, child, vm) {
343343
*/
344344

345345
exports.resolveAsset = function resolve (options, type, id) {
346-
var camelizedId = _.camelize(id)
347-
var pascalizedId = camelizedId.charAt(0).toUpperCase() + camelizedId.slice(1)
348346
var assets = options[type]
349-
return assets[id] || assets[camelizedId] || assets[pascalizedId]
347+
var camelizedId
348+
return assets[id] ||
349+
// camelCase ID
350+
assets[camelizedId = _.camelize(id)] ||
351+
// Pascal Case ID
352+
assets[camelizedId.charAt(0).toUpperCase() + camelizedId.slice(1)]
350353
}

0 commit comments

Comments
 (0)