Skip to content

Commit ec06bc3

Browse files
natocToyyx990803
authored andcommitted
Fix for 'loader.charAt is not a function' in v8 (vuejs#1166)
* Fix for 'loader.charAt is not a function' in v8 I have some older project still runnig on Vue 1 and crash on 'loader.charAt is not a function' error like in the vuejs#624 issue. I am not javascript expert, but this edit solve my issue and maybe can solve also for other. * move logic to 'right' place
1 parent ca1bc07 commit ec06bc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/loader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ module.exports = function (content) {
123123
if (loader !== undefined) {
124124
if (Array.isArray(loader)) {
125125
loader = stringifyLoaders(loader)
126+
} else if (typeof loader === 'object') {
127+
loader = stringifyLoaders([loader])
126128
}
127129

128130
if (type === 'style') {

0 commit comments

Comments
 (0)