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

Commit 4b7e095

Browse files
author
Boris Tacyniak
authored
Merge pull request #1793 from Stanislavja/master
(fix) deep clone details and notifications
2 parents 1f462d8 + 21a101f commit 4b7e095

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
}
@@ -225,7 +225,7 @@ Notifications.localNotification = function(details) {
225225
* @param {Object} details (same as localNotification)
226226
* @param {Date} details.date - The date and time when the system should deliver the notification
227227
*/
228-
Notifications.localNotificationSchedule = function(details) {
228+
Notifications.localNotificationSchedule = function({...details}) {
229229
if ('android' === Platform.os && details && !details.channelId) {
230230
console.warn('No channel id passed, notifications may not work.');
231231
}
@@ -331,7 +331,7 @@ Notifications._onRemoteFetch = function(notificationData) {
331331
}
332332
};
333333

334-
Notifications._onAction = function(notification) {
334+
Notifications._onAction = function({...notification}) {
335335
if ( typeof notification.data === 'string' ) {
336336
try {
337337
notification.data = JSON.parse(notificationData.data);

0 commit comments

Comments
 (0)