mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
lightbox_canvas: Make parameter type error fatal.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
c4024e30c2
commit
d5a0ee612f
@@ -281,8 +281,7 @@ const LightboxCanvas = function (el) {
|
|||||||
} else if (typeof el === "string") {
|
} else if (typeof el === "string") {
|
||||||
this.canvas = document.querySelector(el);
|
this.canvas = document.querySelector(el);
|
||||||
} else {
|
} else {
|
||||||
blueslip.warn("Error. 'LightboxCanvas' accepts either string selector or node.");
|
throw new TypeError("'LightboxCanvas' accepts either string selector or node.");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.context = this.canvas.getContext("2d");
|
this.context = this.canvas.getContext("2d");
|
||||||
|
|||||||
Reference in New Issue
Block a user