Просмотр исходного кода

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 21 часов назад
Родитель
Сommit
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`.
  * Type guard to determine if a value is an `Element`.
  */
  */
 export function isElement(obj: Element | null | undefined): obj is 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>(
 export async function apiRequest<R extends Dict, D extends ReqData = undefined>(

Некоторые файлы не были показаны из-за большого количества измененных файлов