From 85dd5904999ddd911d738f2114037d28ad39a5ae Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 16 Jul 2021 11:59:24 -0600 Subject: [PATCH] Fix text tool producing "null" when cancel button pressed --- src/js/drawtools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/drawtools.js b/src/js/drawtools.js index dd35636..12f10fa 100644 --- a/src/js/drawtools.js +++ b/src/js/drawtools.js @@ -49,7 +49,7 @@ function activateTextTool() { return; } var text = prompt("Enter a line of text to add to the document:"); - if (text == "") { + if (text == "" || text == null) { return; } var canvas = document.createElement('canvas');