Skip to content

EJS transforms primitive values into objects #29

Description

@GoogleCodeExporter
render : function(object, extra_helpers){
        object = object || {}
        this._extra_helpers = extra_helpers;
        var v = new EJS.Helpers(object, extra_helpers || {});
        return this.template.process.call(object, object,v);
    },

this should be:
render : function(object, extra_helpers){
        object = typeof object == "undefined" ? {} : object;
        this._extra_helpers = extra_helpers;
        var v = new EJS.Helpers(object, extra_helpers || {});
        return this.template.process.call(object, object,v);
    },

otherwise if object is 0 it will make a {} out of it

Original issue reported on code.google.com by mendri...@gmail.com on 23 May 2013 at 12:32

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions