File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { isIndexed } from './Predicates';
10
10
import isDataStructure from './utils/isDataStructure' ;
11
11
12
12
export function toJS ( value ) {
13
- if ( isDataStructure ( value ) ) {
13
+ if ( typeof value === 'object' && isDataStructure ( value ) ) {
14
14
value = Seq ( value ) ;
15
15
const result = isIndexed ( value ) ? [ ] : { } ;
16
16
value . forEach ( ( v , k ) => {
Original file line number Diff line number Diff line change @@ -13,8 +13,5 @@ import isPlainObj from './isPlainObj';
13
13
* provided by Immutable.js or a plain Array or Object.
14
14
*/
15
15
export default function isDataStructure ( value ) {
16
- return (
17
- typeof value === 'object' &&
18
- ( isImmutable ( value ) || Array . isArray ( value ) || isPlainObj ( value ) )
19
- ) ;
16
+ return isImmutable ( value ) || Array . isArray ( value ) || isPlainObj ( value ) ;
20
17
}
You can’t perform that action at this time.
0 commit comments