Skip to content

toClj throws exception for js object with property "j" having a numeric value #199

@noonian

Description

@noonian

This is a funny one.

Using node 7.4.0 and mori 0.3.2:

> var m = require("mori");
undefined
> m.toClj({j: 42});
Error: No protocol method IEmptyableCollection.-empty defined for type object: [object Object]
    at x (/Users/jed/tmp/node_modules/mori/mori.js:17:63)
    at Na (/Users/jed/tmp/node_modules/mori/mori.js:19:96)
    at Oc (/Users/jed/tmp/node_modules/mori/mori.js:59:358)
    at v (/Users/jed/tmp/node_modules/mori/mori.js:385:474)
    at Function.b [as d] (/Users/jed/tmp/node_modules/mori/mori.js:387:109)
    at Function.a [as b] (/Users/jed/tmp/node_modules/mori/mori.js:385:42)
    at Object.b (/Users/jed/tmp/node_modules/mori/mori.js:422:95)
    at Object.c [as toClj] (/Users/jed/tmp/node_modules/mori/mori.js:422:168)
    at repl:1:3
    at realRunInThisContextScript (vm.js:22:35)
> 

Adding other properties does not change the behavior. Changing "j" to anything else seems to avoid the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions