Skip to content

Commit

Permalink
Move getSelf to prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
mastef committed Mar 8, 2018
1 parent 9458bd7 commit ac70e40
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,6 @@ function SpreadsheetCell(spreadsheet, ss_key, worksheet_id, data){
}
}

self.getSelf = function() {
if(!!self['_links'] && !!self['_links']['edit']) {
return self['_links']['edit'];
} else {
return self.getId().replace(self.batchId, "private/full/" + self.batchId);
}
}
SpreadsheetCell.prototype.getEdit = function() {
if(!!this['_links'] && !!this['_links']['edit']) {
return this['_links']['edit'];
Expand All @@ -587,6 +580,13 @@ function SpreadsheetCell(spreadsheet, ss_key, worksheet_id, data){
} else {
self._formula = undefined;
}
SpreadsheetCell.prototype.getSelf = function() {
if(!!this['_links'] && !!this['_links']['edit']) {
return this['_links']['edit'];
} else {
return this.getId().replace(this.batchId, "private/full/" + this.batchId);
}
}

// numeric values
if (_data['gs:cell']['$']['numericValue'] !== undefined) {
Expand Down

0 comments on commit ac70e40

Please sign in to comment.