8000 strip data- prefix when initializing props · mikehins/vue@ff66e0b · GitHub
[go: up one dir, main page]

Skip to content

Commit ff66e0b

Browse files
committed
strip data- prefix when initializing props
1 parent e81bd43 commit ff66e0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/instance/scope.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ exports._initProps = function () {
3333
prop = props[i]
3434
// props can be strings or object descriptors
3535
key = _.camelize(
36-
typeof prop === 'string'
36+
(typeof prop === 'string'
3737
? prop
38-
: prop.name
38+
: prop.name).replace(/^data-/, '')
3939
)
4040
if (!(key in data) && key !== '$data') {
4141
data[key] = undefined

0 commit comments

Comments
 (0)
0