From e4452b906e81f51809ed8d18f6e4254df45dc2c5 Mon Sep 17 00:00:00 2001 From: j433866 Date: Thu, 25 Jul 2019 15:14:12 +0100 Subject: [PATCH] Fix functions not being awaited --- src/web/waiters/OutputWaiter.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/waiters/OutputWaiter.mjs b/src/web/waiters/OutputWaiter.mjs index e87e2fc6..005d9533 100755 --- a/src/web/waiters/OutputWaiter.mjs +++ b/src/web/waiters/OutputWaiter.mjs @@ -1153,14 +1153,14 @@ class OutputWaiter { * Handler for copy click events. * Copies the output to the clipboard */ - copyClick() { + async copyClick() { const dish = this.getOutputDish(this.manager.tabs.getActiveOutputTab()); if (dish === null) { this.app.alert("Could not find data to copy. Has this output been baked yet?", 3000); return; } - const output = dish.get(Dish.STRING); + const output = await dish.get(Dish.STRING); // Create invisible textarea to populate with the raw dish string (not the printable version that // contains dots instead of the actual bytes) @@ -1335,7 +1335,7 @@ class OutputWaiter { if (Object.prototype.hasOwnProperty.call(output, "data") && output.data && Object.prototype.hasOwnProperty.call(output.data, "dish")) { - const data = output.data.dish.get(Dish.STRING); + const data = await output.data.dish.get(Dish.STRING); if (contentFilterExp.test(data)) { results.push({ inputNum: iNum,