Skip to content

Commit

Permalink
Use '??='
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Dec 26, 2023
1 parent 83466bc commit e5730af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion themes/default/assets/js/gamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ let audioContext
const playAudioBuffer = async (arrayBuffer) => {
const AudioContext = globalThis.AudioContext
if (AudioContext == null) return
audioContext = audioContext ?? new AudioContext()
audioContext ??= new AudioContext()
const source = audioContext.createBufferSource()
source.buffer = await audioContext.decodeAudioData(arrayBuffer.slice(0))
source.connect(audioContext.destination)
Expand Down

0 comments on commit e5730af

Please sign in to comment.