Skip to content

Commit

Permalink
Merge pull request #1793 from Stanislavja/master
Browse files Browse the repository at this point in the history
(fix) deep clone details and notifications
  • Loading branch information
Boris Tacyniak authored Mar 3, 2021
2 parents 1f462d8 + 21a101f commit 4b7e095
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Notifications.unregister = function() {
* @param {String} details.ticker - ANDROID ONLY: The ticker displayed in the status bar.
* @param {Object} details.userInfo - iOS ONLY: The userInfo used in the notification alert.
*/
Notifications.localNotification = function(details) {
Notifications.localNotification = function({...details}) {
if ('android' === Platform.os && details && !details.channelId) {
console.warn('No channel id passed, notifications may not work.');
}
Expand Down Expand Up @@ -225,7 +225,7 @@ Notifications.localNotification = function(details) {
* @param {Object} details (same as localNotification)
* @param {Date} details.date - The date and time when the system should deliver the notification
*/
Notifications.localNotificationSchedule = function(details) {
Notifications.localNotificationSchedule = function({...details}) {
if ('android' === Platform.os && details && !details.channelId) {
console.warn('No channel id passed, notifications may not work.');
}
Expand Down Expand Up @@ -331,7 +331,7 @@ Notifications._onRemoteFetch = function(notificationData) {
}
};

Notifications._onAction = function(notification) {
Notifications._onAction = function({...notification}) {
if ( typeof notification.data === 'string' ) {
try {
notification.data = JSON.parse(notificationData.data);
Expand Down

0 comments on commit 4b7e095

Please sign in to comment.