Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
lightbox_canvas: Make parameter type error fatal.
Anders Kaseorgd5a0ee612f4d
diff --git a/static/js/lightbox_canvas.js b/static/js/lightbox_canvas.jsindex d461cbf4940..b23203375a8 100644--- a/static/js/lightbox_canvas.js+++ b/static/js/lightbox_canvas.js@@ -281,8 +281,7 @@ const LightboxCanvas = function (el) {} else if (typeof el === "string") {this.canvas = document.querySelector(el);} else {- blueslip.warn("Error. 'LightboxCanvas' accepts either string selector or node.");- return;+ throw new TypeError("'LightboxCanvas' accepts either string selector or node.");}this.context = this.canvas.getContext("2d");