Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 21a101f

Browse files
author
Stanislav
committed
(fix) deep clone details and notifications
1 parent 2682658 commit 21a101f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Notifications.unregister = function() {
145145
* @param {String} details.ticker - ANDROID ONLY: The ticker displayed in the status bar.
146146
* @param {Object} details.userInfo - iOS ONLY: The userInfo used in the notification alert.
147147
*/
148-
Notifications.localNotification = function(details) {
148+
Notifications.localNotification = function({...details}) {
149149
if ('android' === Platform.os && details && !details.channelId) {
150150
console.warn('No channel id passed, notifications may not work.');
151151
}
@@ -224,7 +224,7 @@ Notifications.localNotification = function(details) {
224224
* @param {Object} details (same as localNotification)
225225
* @param {Date} details.date - The date and time when the system should deliver the notification
226226
*/
227-
Notifications.localNotificationSchedule = function(details) {
227+
Notifications.localNotificationSchedule = function({...details}) {
228228
if ('android' === Platform.os && details && !details.channelId) {
229229
console.warn('No channel id passed, notifications may not work.');
230230
}
@@ -329,7 +329,7 @@ Notifications._onRemoteFetch = function(notificationData) {
329329
}
330330
};
331331

332-
Notifications._onAction = function(notification) {
332+
Notifications._onAction = function({...notification}) {
333333
if ( typeof notification.data === 'string' ) {
334334
try {
335335
notification.data = JSON.parse(notificationData.data);

0 commit comments

Comments
 (0)