From ac70e4092b03adea1301ea617d41947cbf2e21e3 Mon Sep 17 00:00:00 2001 From: Markus Stefanko Date: Thu, 8 Mar 2018 13:11:10 +0700 Subject: [PATCH] Move getSelf to prototype --- index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 9267824..ea4f30e 100644 --- a/index.js +++ b/index.js @@ -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']; @@ -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) {