Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo committed Jan 8, 2018
1 parent 782b66c commit 54fd708
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/platforms/web/compiler/directives/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ function genDefaultModel (
const type = el.attrsMap.type

// warn if v-bind:value conflicts with v-model
// except for inputs with v-bind:type
if (process.env.NODE_ENV !== 'production') {
const value = el.attrsMap['v-bind:value'] || el.attrsMap[':value']
if (value) {
const typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']
if (value && !typeBinding) {
const binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'
warn(
`${binding}="${value}" conflicts with v-model on the same element ` +
Expand Down

0 comments on commit 54fd708

Please sign in to comment.