throw "string" -> throw new Error("string"

This commit is contained in:
2020-09-16 17:37:22 +00:00
parent 3dc5f8134c
commit f67379f83f
31 changed files with 195 additions and 151 deletions

View File

@@ -478,14 +478,18 @@ export default {
//check pre-requisites exist just in case
if (this.$ay.dev) {
if (!window.$gz._) {
throw "custom-fields-control: $gz._ (lodash) is required and missing";
throw new Error(
"custom-fields-control: $gz._ (lodash) is required and missing"
);
}
}
},
created() {
if (this.$ay.dev) {
if (!this.formKey) {
throw "custom-fields-control: formKey property is required and missing";
throw new Error(
"custom-fields-control: formKey property is required and missing"
);
}
}
}