Commit 08a2ff63 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Replace type cast with type assertion.

parent a2e322ed
......@@ -533,7 +533,9 @@ getInputElement('activitybox').onchange = function(e) {
}
getInputElement('fileinput').onchange = function(e) {
let input = /** @type{HTMLInputElement} */(this);
if(!(this instanceof HTMLInputElement))
throw new Error('Unexpected type for this');
let input = this;
let files = input.files;
for(let i = 0; i < files.length; i++)
addFileMedia(files[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment