This commit is contained in:
Simon Knott 2024-12-05 15:45:25 -08:00
parent 0eedcffb49
commit b26671c462
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -79,8 +79,7 @@ export class RecorderCollection extends EventEmitter {
callMetadata.error = error ? serializeError(error) : undefined; callMetadata.error = error ? serializeError(error) : undefined;
// Do not wait for onAfterCall so that performAction returned immediately after the action. // Do not wait for onAfterCall so that performAction returned immediately after the action.
mainFrame.instrumentation.onAfterCall(mainFrame, callMetadata).then(() => { mainFrame.instrumentation.onAfterCall(mainFrame, callMetadata).then(() => {
if (this._enabled) this._fireChange();
this._fireChange();
}).catch(() => {}); }).catch(() => {});
} }
@ -127,6 +126,9 @@ export class RecorderCollection extends EventEmitter {
} }
private _fireChange() { private _fireChange() {
if (!this._enabled)
return;
this.emit('change', collapseActions(this._actions)); this.emit('change', collapseActions(this._actions));
} }
} }