@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.
@@ -2247,6 +2247,12 @@ class WebsyForm {
2247
2247
  clear () {
2248
2248
  const formEl = document.getElementById(`${this.elementId}Form`)
2249
2249
  formEl.reset()
2250
+ if (!this.options.fields) {
2251
+ this.options.fields = []
2252
+ }
2253
+ this.options.fields.forEach(f => {
2254
+ this.setValue(f.field, '')
2255
+ })
2250
2256
  this.loader.hide()
2251
2257
  }
2252
2258
  get data () {
@@ -3877,6 +3883,9 @@ class WebsyPubSub {
3877
3883
  this.subscriptions = {}
3878
3884
  }
3879
3885
  publish (id, method, data) {
3886
+ if (!this.subscriptions) {
3887
+ return
3888
+ }
3880
3889
  if (arguments.length === 3) {
3881
3890
  if (this.subscriptions[id] && this.subscriptions[id][method]) {
3882
3891
  this.subscriptions[id][method](data)