You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Replace instanceof Array with Array.isArray (#2812)
This commit is contained in:
committed by
GitHub
parent
6f2390a765
commit
b44787192d
@@ -217,7 +217,7 @@ const MAC_SET = new Set(MAC_LIST);
|
||||
const SAS_SET = new Set(SAS_LIST);
|
||||
|
||||
function intersection<T>(anArray: T[], aSet: Set<T>): T[] {
|
||||
return anArray instanceof Array ? anArray.filter(x => aSet.has(x)) : [];
|
||||
return Array.isArray(anArray) ? anArray.filter(x => aSet.has(x)) : [];
|
||||
}
|
||||
|
||||
export enum SasEvent {
|
||||
|
||||
Reference in New Issue
Block a user