Skip to content

Commit

Permalink
Fixed case where array fields were not able to be pushed to DataSource
Browse files Browse the repository at this point in the history
  • Loading branch information
tjclement committed Sep 22, 2015
1 parent 7b12738 commit 7b7973d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ObjectHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ export class ObjectHelper {
let value = rootObject[name];

/* Value must be a non-null primitive or object to be pushable to a dataSource */
if (value !== null && value !== undefined && typeof value !== 'function') {
if (typeof value === 'object') {
if (value !== null && value !== undefined && typeof value !==
'function') {
if (typeof value === 'object' && !(value instanceof Array)) {
result[name] = ObjectHelper.getEnumerableProperties(value);
} else {
result[name] = value;
Expand All @@ -210,7 +211,7 @@ export class ObjectHelper {

/* Value must be a non-null primitive or object to be pushable to a dataSource */
if (value !== null && value !== undefined && typeof value !== 'function') {
if (typeof value === 'object') {
if (typeof value === 'object' && !(value instanceof Array)) {
result[name] = ObjectHelper.getEnumerableProperties(value);
} else {
result[name] = value;
Expand Down

0 comments on commit 7b7973d

Please sign in to comment.