Skip to content

Commit

Permalink
refactor(initWorker): null coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
jafin authored and guillaume-chervet committed Jul 22, 2024
1 parent 34bd8e4 commit 6b5f6b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oidc-client/src/initWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const sendMessageAsync =
return new Promise(function (resolve, reject) {
const messageChannel = new MessageChannel();
messageChannel.port1.onmessage = function (event) {
if (event.data && event.data.error) {
if (event?.data.error) {
reject(event.data.error);
} else {
resolve(event.data);
Expand Down

0 comments on commit 6b5f6b4

Please sign in to comment.