[addon] fixes extension check fn npe
This commit is contained in:
parent
ca6285eff2
commit
15c9ec45ab
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ function isArchive(filename) {
|
|||
}
|
||||
|
||||
function isExtension(filename, extensions) {
|
||||
const extensionMatch = filename.match(/\.(\w{2,4})$/);
|
||||
const extensionMatch = filename && filename.match(/\.(\w{2,4})$/);
|
||||
return extensionMatch && extensions.includes(extensionMatch[1].toLowerCase());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue