|
@@ -202,9 +202,9 @@ export function mockConvertFileSrc(
|
|
|
*/
|
|
|
export function clearMocks(): void {
|
|
|
// @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case
|
|
|
- delete window.__TAURI__.convertFileSrc
|
|
|
+ if (window.__TAURI__?.convertFileSrc) delete window.__TAURI__.convertFileSrc
|
|
|
// @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case
|
|
|
- delete window.__TAURI_IPC__
|
|
|
+ if (window.__TAURI_IPC__) delete window.__TAURI_IPC__
|
|
|
// @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case
|
|
|
- delete window.__TAURI_METADATA__
|
|
|
+ if (window.__TAURI_METADATA__) delete window.__TAURI_METADATA__
|
|
|
}
|