Skip to content

Commit

Permalink
Move valueForSave getter to prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
mastef committed Mar 8, 2018
1 parent da9ff6f commit 31cc75e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,12 @@ function SpreadsheetCell(spreadsheet, ss_key, worksheet_id, data){
}
});

Object.defineProperty(SpreadsheetCell.prototype, "valueForSave", {
get: function() {
return xmlSafeValue(this._formula || this._value);
}
});

self.__defineGetter__('valueForSave', function() {
return xmlSafeValue(self._formula || self._value);
});

self.save = function(cb) {
if ( !cb ) cb = function(){};
Expand Down

0 comments on commit 31cc75e

Please sign in to comment.