mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +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") {
 | 
			
		||||
        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");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user