mirror of
https://github.com/jech/galene.git
synced 2024-11-23 00:55:58 +01:00
Replace type cast with type assertion.
This commit is contained in:
parent
a2e322edcb
commit
08a2ff63fc
1 changed files with 3 additions and 1 deletions
|
@ -533,7 +533,9 @@ getInputElement('activitybox').onchange = function(e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
getInputElement('fileinput').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;
|
let files = input.files;
|
||||||
for(let i = 0; i < files.length; i++)
|
for(let i = 0; i < files.length; i++)
|
||||||
addFileMedia(files[i]);
|
addFileMedia(files[i]);
|
||||||
|
|
Loading…
Reference in a new issue