From 5932a07eb28eae5b2399aa7de3e9cef0f0adfb1d Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Fri, 9 Dec 2022 10:15:38 +0100 Subject: [PATCH] Fixed: Make sure Jakefile both work for async and sync calls The callback variable was not set if the call to initilize was synchronous. It is now set before so both sync and async will work --- AppKit/Themes/Aristo2/Jakefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AppKit/Themes/Aristo2/Jakefile b/AppKit/Themes/Aristo2/Jakefile index 9fa544e58..55086eb7d 100644 --- a/AppKit/Themes/Aristo2/Jakefile +++ b/AppKit/Themes/Aristo2/Jakefile @@ -8,8 +8,6 @@ function callbackFunction(blendtask) { callback(blendtask); } -require("../../../CommonJS/lib/cappuccino/jake.js").initilize(callbackFunction); - $BUILD_CJS_BLENDTASK = path.join($BUILD_CJS_CAPPUCCINO, "lib", "cappuccino", "jake", "blendtask.j"); var promise = new Promise((resolve, reject) => { @@ -23,6 +21,8 @@ var promise = new Promise((resolve, reject) => { } }); +require("../../../CommonJS/lib/cappuccino/jake.js").initilize(callbackFunction); + async function defineBlendTask() { await exports.blend ("Aristo2.blend", function(aristoTask) { @@ -36,4 +36,4 @@ async function defineBlendTask() { task ("build", ["Aristo2.blend"]); } -exports.jakePromise = promise; \ No newline at end of file +exports.jakePromise = promise;