From 5779149a7fe133d828fac6d892a0e561598c2667 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Wed, 18 Sep 2024 12:56:56 +0000 Subject: [PATCH] Yet another attempt at no Top Level Await NP-389 --- DulcificumJS/package.json | 2 +- DulcificumJS/src/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DulcificumJS/package.json b/DulcificumJS/package.json index b1e0ca2..0bbefba 100644 --- a/DulcificumJS/package.json +++ b/DulcificumJS/package.json @@ -1,6 +1,6 @@ { "name": "@ultimaker/dulcificumjs", - "version": "0.1.0-alpha.6", + "version": "0.1.0-alpha.7", "description": "DulcificumJS is a TS component to run Dulcificum in a browser", "main": "dist/index.js", "scripts": { diff --git a/DulcificumJS/src/index.ts b/DulcificumJS/src/index.ts index 5197bd4..01ca2a9 100644 --- a/DulcificumJS/src/index.ts +++ b/DulcificumJS/src/index.ts @@ -13,5 +13,8 @@ export async function initialize(): Promise { } export function gcode_2_miracle_jtp(input: string): string { + if (mod == null) { + return ""; + } return mod.gcode_2_miracle_jtp(input); }