Skip to content

Commit

Permalink
fixup! lib: use kResistStopPropagation
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Jun 26, 2023
1 parent fc1e0ad commit c0dbb4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ function pipelineImpl(streams, callback, opts) {
finishImpl(new AbortError());
}

kResistStopPropagation ??= require('internal/event_target').kResistStopPropagation;
outerSignal?.addEventListener('abort', abort, { __proto__: null, [kResistStopPropagation]: true });

let error;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/watch_mode/files_watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FilesWatcher extends EventEmitter {
if (signal) {
kResistStopPropagation ??= require('internal/event_target').kResistStopPropagation;
const opts = { __proto__: null, once: true, [kResistStopPropagation]: true };
signal?.addEventListener('abort', () => this.clear(), opts);
signal.addEventListener('abort', () => this.clear(), opts);
}
}

Expand Down

0 comments on commit c0dbb4b

Please sign in to comment.