codecombat / treema

jQuery plugin that generates HTML interfaces to edit JSON data defined by json-schema.
http://codecombat.github.io/treema/
MIT License
152 stars 36 forks source link

populateData is wrong ! #54

Open weiyinfu opened 6 years ago

weiyinfu commented 6 years ago

This is the demo of treema http://codecombat.github.io/treema/ There is a head js in this html : http://codecombat.github.io/treema/js/treema.js This function is wrong:

    TreemaNode.prototype.populateData = function () {
        return this.data = this.data || this.schema["default"] || this.getDefaultValue();
    };

when this.data=0,its populated data will be null , but actually it should be a number 0.
It cost me all the morning. I hope you can update that demo !