File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -148,15 +148,15 @@ function sendNotification(endpoint, params) {
148
148
console . warn ( 'You are using the old, deprecated, interface of the `sendNotification` function.' . bold . red ) ;
149
149
}
150
150
151
- if ( typeof userPublicKey !== 'undefined' ) {
151
+ if ( userPublicKey ) {
152
152
if ( typeof userPublicKey !== 'string' ) {
153
153
throw new Error ( 'userPublicKey should be a base64-encoded string.' ) ;
154
154
} else if ( urlBase64 . decode ( userPublicKey ) . length !== 65 ) {
155
155
throw new Error ( 'userPublicKey should be 65 bytes long.' ) ;
156
156
}
157
157
}
158
158
159
- if ( typeof userAuth !== 'undefined' ) {
159
+ if ( userAuth ) {
160
160
if ( typeof userAuth !== 'string' ) {
161
161
throw new Error ( 'userAuth should be a base64-encoded string.' ) ;
162
162
} else if ( urlBase64 . decode ( userAuth ) . length < 12 ) {
You can’t perform that action at this time.
0 commit comments