You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 7v. Fix destructuring {reason} from undefined in watcher termination handler
488
+
old = 'i.then(({reason:r})=>{r?.code===0?this.trace(`terminated by itself with code ${r.code}, signal: ${r.signal}`):this.onError(`terminated by itself unexpectedly'
489
+
new = 'i.then(({reason:r}={})=>{r?.code===0?this.trace(`terminated by itself with code ${r.code}, signal: ${r.signal}`):this.onError(`terminated by itself unexpectedly'
490
+
if old in js:
491
+
js = js.replace(old, new, 1)
492
+
changed = True
493
+
print(' watcher reason destructuring patched')
494
+
elif '({reason:r}={})' in js and 'terminated by itself' in js:
495
+
print(' watcher reason already patched')
496
+
497
+
# 7w. Fix _getInitialData destructuring non-iterable result (fallback to empty array)
498
+
old = 'call("_getInitialData").then(([i,r,s])=>{this.updateStatus(i),this.updateConflicts(r),s&&this.updateLastSyncTime(s)'
499
+
new = 'call("_getInitialData").then((_d)=>{const [i,r,s]=Array.isArray(_d)?_d:[];i&&this.updateStatus(i),r&&this.updateConflicts(r),s&&this.updateLastSyncTime(s)'
0 commit comments