Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 3f391c4

Browse files
Apply nullish coalescing in the audio timeline
1 parent 1282474 commit 3f391c4

File tree

1 file changed

+1
-1
lines changed
  • packages/library/src/util/timeline/items

1 file changed

+1
-1
lines changed

packages/library/src/util/timeline/items/audio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class AudioNodeItem {
8282
...this.defaultPayload,
8383
...payload,
8484
// Only override gain if it is truly undefined (zero values are ok)
85-
gain: payload.gain === undefined ? 1 : payload.gain,
85+
gain: payload.gain ?? 1,
8686
}
8787
this.processingChain = []
8888
this.nodeOrder = {}

0 commit comments

Comments
 (0)