File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,16 @@ function init(options: InitOptions): OnboardAPI {
9292 connect
9393 } = options
9494
95+ const { device, svelteInstance } = configuration
96+
97+ if ( svelteInstance ) {
98+ // if already initialized, need to cleanup old instance
99+ console . warn ( 'Re-initializing Onboard and resetting back to initial state' )
100+ reset$ . next ( )
101+ }
102+
95103 initI18N ( i18n )
96104 addChains ( chainIdToHex ( chains ) )
97- const { device, svelteInstance } = configuration
98105
99106 if ( typeof connect !== undefined ) {
100107 updateConnectModal ( connect )
@@ -193,12 +200,6 @@ function init(options: InitOptions): OnboardAPI {
193200 updateNotify ( notifyUpdate )
194201 }
195202
196- if ( svelteInstance ) {
197- // if already initialized, need to cleanup old instance
198- console . warn ( 'Re-initializing Onboard and resetting back to initial state' )
199- reset$ . next ( )
200- }
201-
202203 const app = svelteInstance || mountApp ( )
203204
204205 updateConfiguration ( {
You can’t perform that action at this time.
0 commit comments