Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] Resource instance schema should not be enumerable

  • Loading branch information...
commit 9a8aff549d8612489c2adfe7e6982928aaeb394f 1 parent 7ca717f
@bmeck bmeck authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/resourceful/resource.js
View
6 lib/resourceful/resource.js
@@ -12,7 +12,10 @@ var Resource = exports.Resource = function () {
Object.defineProperty(this, 'isNewRecord', {
value: true, writable: true
});
- this.schema = this.constructor.schema;
+ Object.defineProperty(this, 'schema', {
+ value: this.constructor.schema,
+ enumerable: false
+ });
};
//
@@ -513,6 +516,7 @@ Resource.prototype.saveAttachment = function (name, data, callback) {
Resource.prototype.destroy = function () {};
Resource.prototype.reload = function () {};
Resource.prototype.readProperty = function (k, getter) {
+console.log(k)
return getter ? getter.call(this, this._properties[k]) : this._properties[k];
};
Please sign in to comment.
Something went wrong with that request. Please try again.