Fix extra-button on macOS.

This commit is contained in:
Nuno Cruces 2021-03-03 11:56:41 +00:00
parent c214d2b6ff
commit 12a6bd248c
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ app.activate()
var res=app[{{json .Operation}}]({{json .Text}},{{json .Options}}) var res=app[{{json .Operation}}]({{json .Text}},{{json .Options}})
if(res.gaveUp){ObjC.import("stdlib") if(res.gaveUp){ObjC.import("stdlib")
$.exit(5)} $.exit(5)}
if(res.buttonReturned==={{json .Extra}}){res}else{void 0} if(res.buttonReturned==={{json .Extra}}){res.buttonReturned}else{void 0}
{{- end}} {{- end}}
{{define "notify" -}} {{define "notify" -}}
var app=Application.currentApplication() var app=Application.currentApplication()

View file

@ -8,7 +8,7 @@ if (res.gaveUp) {
$.exit(5) $.exit(5)
} }
if (res.buttonReturned === {{json .Extra}}) { if (res.buttonReturned === {{json .Extra}}) {
res res.buttonReturned
} else { } else {
void 0 void 0
} }