@@ -5,7 +5,6 @@ import { EventEmitter } from 'events';
55import { app , BrowserWindow , ipcMain , session , powerMonitor , Tray } from 'electron' ;
66import { release , platform } from 'node:os' ;
77
8- import { isJsonObject } from 'tiny-essentials' ;
98import { AppEvents , RootEvents } from '../global/Events.mjs' ;
109import { checkEventsList , deepClone , serializeError } from '../global/Utils.mjs' ;
1110import TinyWinInstance from './TinyWinInstance.mjs' ;
@@ -762,7 +761,8 @@ class TinyElectronRoot {
762761 isMain = false ,
763762 } = { } ) {
764763 // Validate input
765- if ( ! isJsonObject ( appDetails ) ) throw new TypeError ( 'Expected "appDetails" to be a object.' ) ;
764+ if ( typeof appDetails !== 'object' )
765+ throw new TypeError ( 'Expected "appDetails" to be a object.' ) ;
766766 if ( typeof isMain !== 'boolean' ) throw new TypeError ( 'Expected "isMain" to be a boolean.' ) ;
767767 if ( typeof needsMaximize !== 'boolean' )
768768 throw new TypeError ( 'Expected "needsMaximize" to be a boolean.' ) ;
@@ -778,7 +778,7 @@ class TinyElectronRoot {
778778 let cfg ;
779779 if ( typeof fileId === 'string' && ! this . #winFile. hasId ( fileId ) ) this . #winFile. loadFile ( fileId ) ;
780780 if ( typeof fileId === 'string' ) {
781- if ( ! isJsonObject ( config ) )
781+ if ( typeof config !== 'object' )
782782 throw new Error ( '[Window Creation Error] Expected "config" to be an object.' ) ;
783783
784784 cfg = deepClone ( config ) ;
@@ -1666,7 +1666,7 @@ class TinyElectronRoot {
16661666 }
16671667
16681668 // Validate `ops`
1669- if ( ops !== undefined && ! isJsonObject ( ops ) )
1669+ if ( ops !== undefined && typeof ops !== 'object' )
16701670 throw new TypeError ( 'Expected "ops" to be an object.' ) ;
16711671
16721672 // Load by URL or file
0 commit comments