Преглед изворни кода

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 часа
родитељ
комит
ecb1b6376e

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
netbox/project-static/dist/netbox.js


Разлика између датотеке није приказан због своје велике величине
+ 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>(

Неке датотеке нису приказане због велике количине промена