Skip to content

Commit e704117

Browse files
committed
Remove arrow functions
1 parent b982c90 commit e704117

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Google sheets content sync.sketchplugin/Contents/Sketch/main.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function syncContent() {
8282
return
8383

8484
// Update the values for each page
85-
doc.pages().forEach(page => {
85+
doc.pages().forEach(function(page) {
8686

8787
var sheetTitle = valueFromName(page.name())
8888
var pageValues = valuesForSheet(sheetTitle)
@@ -93,13 +93,13 @@ function syncContent() {
9393
pageValues = firstSheet.values
9494
}
9595

96-
page.children().forEach(child => {
96+
page.children().forEach(function(child) {
9797
if (child.isMemberOfClass(MSSymbolInstance)) {
9898

9999
// Store new overrides that need to be made
100100
var overrides = {}
101101

102-
child.symbolMaster().children().forEach(symbolLayer => {
102+
child.symbolMaster().children().forEach(function(symbolLayer) {
103103
// Ignore layers that are not text layers
104104
// Only include layers that have a '#' in the name
105105
if (!symbolLayer.isMemberOfClass(MSTextLayer) || symbolLayer.name().indexOf('#') < 0)
@@ -241,7 +241,7 @@ function valuesForSheet(sheetName) {
241241
return null
242242
}
243243

244-
var sheet = sheetValues.find(sheet => {
244+
var sheet = sheetValues.find(function(sheet) {
245245
return sheet.title.replace(/\s/g, '').toLowerCase() == sheetName.replace(/\s/g, '').toLowerCase()
246246
})
247247

@@ -292,10 +292,10 @@ function fetchValuesForPage(sheetID, pageNumber) {
292292
function parseData(data) {
293293
var values = {}
294294

295-
data.feed.entry.forEach(entry => {
296-
Object.keys(entry).filter(key => {
295+
data.feed.entry.forEach(function(entry) {
296+
Object.keys(entry).filter(function(key) {
297297
return key.indexOf('gsx$') == 0
298-
}).forEach(key => {
298+
}).forEach(function(key) {
299299
var newKey = key.substring(4)
300300
if (!(values.hasOwnProperty(newKey))) {
301301
values[newKey] = []

Google sheets content sync.sketchplugin/Contents/Sketch/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Sync content within a Google Sheets document, to text layers — based on their names",
44
"author": "David Williames",
55
"homepage": "https://github.com/DWilliames/Google-sheets-content-sync-sketch-plugin",
6-
"version": 1.1,
6+
"version": "1.1.1",
77
"identifier": "com.davidwilliames.sketch-plugins.google-sheets-content-sync",
88
"compatibleVersion": 39,
99
"bundleVersion": 1,

0 commit comments

Comments
 (0)