Przeglądaj źródła

Fixes #23432: Correct null check in isElement() type guard (#23433)

Compare the value directly so null no longer passes the type guard.
Rebuild the JavaScript bundle and source map.
Jeremy Stretch 11 godzin temu
rodzic
commit
ecb1b6376e

Plik diff jest za duży
+ 0 - 0
netbox/project-static/dist/netbox.js


Plik diff jest za duży
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 1 - 1
netbox/project-static/src/util.ts

@@ -92,7 +92,7 @@ export function resetSelect<S extends HTMLSelectElement>(select: S): void {
  * Type guard to determine if a value is an `Element`.
  */
 export function isElement(obj: Element | null | undefined): obj is Element {
-  return typeof obj !== null && typeof obj !== 'undefined';
+  return obj !== null && obj !== undefined;
 }
 
 export async function apiRequest<R extends Dict, D extends ReqData = undefined>(

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików