Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
9f5454d5
Commit
9f5454d5
authored
Oct 31, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use Object.assign instead of Object.create
parent
91c5f793
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
local-notification-core.js
www/local-notification-core.js
+2
-2
local-notification-util.js
www/local-notification-util.js
+1
-1
No files found.
www/local-notification-core.js
View file @
9f5454d5
...
@@ -335,14 +335,14 @@ exports.addActionGroup = function (id, actions, callback, scope) {
...
@@ -335,14 +335,14 @@ exports.addActionGroup = function (id, actions, callback, scope) {
* @return [ Object ]
* @return [ Object ]
*/
*/
exports
.
getDefaults
=
function
()
{
exports
.
getDefaults
=
function
()
{
var
map
=
Object
.
create
(
this
.
_defaults
);
var
map
=
Object
.
assign
({},
this
.
_defaults
);
for
(
var
key
in
map
)
{
for
(
var
key
in
map
)
{
if
(
Array
.
isArray
(
map
[
key
]))
{
if
(
Array
.
isArray
(
map
[
key
]))
{
map
[
key
]
=
Array
.
from
(
map
[
key
]);
map
[
key
]
=
Array
.
from
(
map
[
key
]);
}
else
}
else
if
(
Object
.
prototype
.
isPrototypeOf
(
map
[
key
]))
{
if
(
Object
.
prototype
.
isPrototypeOf
(
map
[
key
]))
{
map
[
key
]
=
Object
.
create
(
map
[
key
]);
map
[
key
]
=
Object
.
assign
({},
map
[
key
]);
}
}
}
}
...
...
www/local-notification-util.js
View file @
9f5454d5
...
@@ -119,7 +119,7 @@ exports.convertProperties = function (options) {
...
@@ -119,7 +119,7 @@ exports.convertProperties = function (options) {
var
parseToInt
=
function
(
prop
,
options
)
{
var
parseToInt
=
function
(
prop
,
options
)
{
if
(
isNaN
(
options
[
prop
]))
{
if
(
isNaN
(
options
[
prop
]))
{
console
.
warn
(
prop
+
' is not a number: '
+
options
[
prop
]);
console
.
warn
(
prop
+
' is not a number: '
+
options
[
prop
]);
return
this
.
getDefaults
()
[
prop
];
return
this
.
_defaults
[
prop
];
}
else
{
}
else
{
return
Number
(
options
[
prop
]);
return
Number
(
options
[
prop
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment