Skip to content

Commit

Permalink
refactor(initWorker): null coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
jafin committed Jul 21, 2024
1 parent 5e47636 commit d0da364
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 d0da364

Please sign in to comment.