Version : 2.2.4
i export to my app:
class Error {
constructor() {
this.errors = {}
}
has(input) {
return this.errors.hasOwnProperty(input)
}
}
class Form {
constructor(inputs) {
this.inputs = inputs
for (let input in inputs) {
this[input] = inputs[input]
}
this.errors = new Error()
}
}
export default Form
and when in form i use <span v-if="form.errors.has('username')">Hello</span>
i get error:
app.js:633 [Vue warn]: Error in render function
TypeError: _vm.form.errors.has is not a function
at Proxy.render (app.js:9923)
at VueComponent.Vue._render (app.js:3644)
at VueComponent.updateComponent (app.js:2214)
at Watcher.get (app.js:2523)
at Watcher.run (app.js:2593)
at flushSchedulerQueue (app.js:2387)
at Array.<anonymous> (app.js:580)
at nextTickHandler (app.js:529)
what can i solve this problem?
Hello, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue - thank you!