@websy/websy-designs 1.11.15 → 1.11.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2452,6 +2452,12 @@ class WebsyForm {
|
|
|
2452
2452
|
clear () {
|
|
2453
2453
|
const formEl = document.getElementById(`${this.elementId}Form`)
|
|
2454
2454
|
formEl.reset()
|
|
2455
|
+
if (!this.options.fields) {
|
|
2456
|
+
this.options.fields = []
|
|
2457
|
+
}
|
|
2458
|
+
this.options.fields.forEach(f => {
|
|
2459
|
+
this.setValue(f.field, '')
|
|
2460
|
+
})
|
|
2455
2461
|
this.loader.hide()
|
|
2456
2462
|
}
|
|
2457
2463
|
get data () {
|
|
@@ -4321,6 +4327,9 @@ class WebsyPubSub {
|
|
|
4321
4327
|
this.subscriptions = {}
|
|
4322
4328
|
}
|
|
4323
4329
|
publish (id, method, data) {
|
|
4330
|
+
if (!this.subscriptions) {
|
|
4331
|
+
return
|
|
4332
|
+
}
|
|
4324
4333
|
if (arguments.length === 3) {
|
|
4325
4334
|
if (this.subscriptions[id] && this.subscriptions[id][method]) {
|
|
4326
4335
|
this.subscriptions[id][method](data)
|