Skip to content

Commit 33f6d95

Browse files
author
Florian Vaneste
authored
Replace .indexOf(value) !== -1 with .includes (#2931)
1 parent 5fa1d6d commit 33f6d95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/guide/components-props.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Vue.component('my-component', {
225225
propF: {
226226
validator: function (value) {
227227
// The value must match one of these strings
228-
return ['success', 'warning', 'danger'].indexOf(value) !== -1
228+
return ['success', 'warning', 'danger'].includes(value)
229229
}
230230
}
231231
}

0 commit comments

Comments
 (0)