Răsfoiți Sursa

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 12 ore în urmă
părinte
comite
ecb1b6376e

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
netbox/project-static/dist/netbox.js


Fișier diff suprimat deoarece este prea mare
+ 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>(

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff