From 54b4c8f73ef3898f2c8138eb507240728591f47f Mon Sep 17 00:00:00 2001 From: Clemens Mol Date: Tue, 27 Mar 2018 14:36:45 +0200 Subject: [PATCH] Update Custom.js [NSArray arrayWithObjects] stopped working on 10.13. This is a bug caused by CocoaScript itself. Reference on: ccgus/CocoaScript#48 . Workaround this bug by using [NSArray arrayWithArray] instead. Fixes #175 --- CG.sketchplugin/Contents/Sketch/Images/Custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CG.sketchplugin/Contents/Sketch/Images/Custom.js b/CG.sketchplugin/Contents/Sketch/Images/Custom.js index 6d5155c..8b9f440 100644 --- a/CG.sketchplugin/Contents/Sketch/Images/Custom.js +++ b/CG.sketchplugin/Contents/Sketch/Images/Custom.js @@ -6,7 +6,7 @@ function onRun(context){ - var fileTypes = [NSArray arrayWithObjects:@"png", @"jpg", @"gif", @"jpeg", nil]; + var fileTypes = [NSArray arrayWithArray:[@"png", @"jpg", @"gif", @"jpeg"]]; var panel = [NSOpenPanel openPanel]; var imageFileNames = []; [panel setCanChooseFiles:true];