diff --git a/src/compiler/parser/index.js b/src/compiler/parser/index.js index e0d44141538..81e0e2e92ba 100644 --- a/src/compiler/parser/index.js +++ b/src/compiler/parser/index.js @@ -414,6 +414,7 @@ function processAttrs (el) { if (bindRE.test(name)) { // v-bind name = name.replace(bindRE, '') value = parseFilters(value) + isProp = false if (modifiers) { if (modifiers.prop) { isProp = true diff --git a/test/unit/features/directives/bind.spec.js b/test/unit/features/directives/bind.spec.js index f9d17a584a9..5635778569c 100644 --- a/test/unit/features/directives/bind.spec.js +++ b/test/unit/features/directives/bind.spec.js @@ -121,6 +121,18 @@ describe('Directive v-bind', () => { expect(vm.$el.children[1].innerHTML).toBe('qux') }) + it('.prop modifier with normal attribute binding', () => { + const vm = new Vue({ + template: '', + data: { + some: 'hello', + id: false + } + }).$mount() + expect(vm.$el.some).toBe('hello') + expect(vm.$el.getAttribute('id')).toBe(null) + }) + it('.camel modifier', () => { const vm = new Vue({ template: '',