Skip to content

Commit

Permalink
Update Custom.js
Browse files Browse the repository at this point in the history
[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 timuric#175
  • Loading branch information
clemensmol authored Mar 27, 2018
1 parent 766cebd commit 54b4c8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CG.sketchplugin/Contents/Sketch/Images/Custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 54b4c8f

Please sign in to comment.