widget_base: make deep copy robust to null values
This commit is contained in:
parent
45ba2492c7
commit
833e028ffc
1 changed files with 4 additions and 0 deletions
|
|
@ -64,6 +64,10 @@ module.exports = class _widgets_base {
|
|||
var copy = obj,
|
||||
key
|
||||
|
||||
if (obj === null) {
|
||||
return obj
|
||||
}
|
||||
|
||||
if (typeof obj === 'object') {
|
||||
copy = Array.isArray(obj) ? [] : {}
|
||||
for (key in obj) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue