Skip to content

Commit 7c9cf79

Browse files
committed
check that aps exists
1 parent cd26512 commit 7c9cf79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/InputComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class InputComponent extends React.Component {
159159
// If `content-available` equals 1 and `aps` dictionary doesn't contain any other keys, the notification is silent.
160160
// `apns-push-type` must be set to `background` for iOS 13+.
161161
const aps = json["aps"]
162-
if (aps["content-available"] === 1) {
162+
if (aps && aps["content-available"] === 1) {
163163
let size = 0, key
164164
for (key in aps) {
165165
size++

0 commit comments

Comments
 (0)