Skip to content

Error: Encode is not a function #20

@kheyse-autodesk

Description

@kheyse-autodesk

When running

var whacko = require('whacko');

var a = whacko.load('<line x1="15" y1="-15" x2="15" y2="-40"/>', {
        xmlMode: true
    });
a.xml();

I get the error

whacko/lib/render.js:34
            output += key + '="' + encode(value) + '"';
                                   ^

TypeError: encode is not a function
    at formatAttrs (whacko/lib/render.js:34:36)
    at renderTag (whacko/lib/render.js:132:19)
    at whacko/lib/render.js:100:23
    at arrayEach (whacko/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (whacko/node_modules/lodash/index.js:3345:13)
    at module.exports (whacko/lib/render.js:95:7)
    at whacko/lib/render.js:111:24
    at arrayEach (whacko/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (whacko/node_modules/lodash/index.js:3345:13)
    at module.exports (whacko/lib/render.js:95:7)

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