Calling `$isActive` in library code throws error
See original GitHub issuebug description
When calling $isActive inside an imported library. I get this error:
Failed to init component
<Test>
TypeError: Cannot read property 'params' of null
at url (../auxcontrol-ui-toolkit/node_modules/@roxi/routify/runtime/helpers.js:213:61)
at isActive (../auxcontrol-ui-toolkit/node_modules/@roxi/routify/runtime/helpers.js:333:16)
at instance (eval at <anonymous> (http://localhost:5000/build/index.js:6599:17), <anonymous>:86:15)
at init (node_modules/svelte/internal/index.mjs:1471:11)
at new Test (eval at <anonymous> (http://localhost:5000/build/index.js:6599:17), <anonymous>:123:3)
at createProxiedComponent (node_modules/svelte-hmr/runtime/svelte-hooks.js:206:9)
at new ProxyComponent (node_modules/svelte-hmr/runtime/proxy.js:237:20)
at new Proxy<Test> (node_modules/svelte-hmr/runtime/proxy.js:302:11)
at create_fragment (eval at <anonymous> (http://localhost:5000/build/index.js:16:17), <anonymous>:42:9)
at init (node_modules/svelte/internal/index.mjs:1486:37)
<Index>
TypeError: Cannot read property 'params' of null
at url (../auxcontrol-ui-toolkit/node_modules/@roxi/routify/runtime/helpers.js:213:61)
at isActive (../auxcontrol-ui-toolkit/node_modules/@roxi/routify/runtime/helpers.js:333:16)
at instance (eval at <anonymous> (http://localhost:5000/build/index.js:6599:17), <anonymous>:86:15)
at init (node_modules/svelte/internal/index.mjs:1471:11)
at new Test (eval at <anonymous> (http://localhost:5000/build/index.js:6599:17), <anonymous>:123:3)
at createProxiedComponent (node_modules/svelte-hmr/runtime/svelte-hooks.js:206:9)
at new ProxyComponent (node_modules/svelte-hmr/runtime/proxy.js:237:20)
at new Proxy<Test> (node_modules/svelte-hmr/runtime/proxy.js:302:11)
at create_fragment (eval at <anonymous> (http://localhost:5000/build/index.js:16:17), <anonymous>:42:9)
at init (node_modules/svelte/internal/index.mjs:1486:37)
<Noop>
TypeError: Cannot read property 'params' of null
at url (../auxcontrol-ui-toolkit/node_modules/@roxi/routify/runtime/helpers.js:213:61)
at isActive (../auxcontrol-ui-toolkit/node_modules/@roxi/routify/runtime/helpers.js:333:16)
at instance (eval at <anonymous> (http://localhost:5000/build/index.js:6599:17), <anonymous>:86:15)
at init (node_modules/svelte/internal/index.mjs:1471:11)
at new Test (eval at <anonymous> (http://localhost:5000/build/index.js:6599:17), <anonymous>:123:3)
at createProxiedComponent (node_modules/svelte-hmr/runtime/svelte-hooks.js:206:9)
at new ProxyComponent (node_modules/svelte-hmr/runtime/proxy.js:237:20)
at new Proxy<Test> (node_modules/svelte-hmr/runtime/proxy.js:302:11)
at create_fragment (eval at <anonymous> (http://localhost:5000/build/index.js:16:17), <anonymous>:42:9)
at init (node_modules/svelte/internal/index.mjs:1486:37)
versions Routify: 2.12.5, Svelte: 3.32.3
I checked the “routify” context inside my library and it is the same as in the consuming code.
If you need any more info or if I can help you in any way, feel free to ask. Would be nice to have this work!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to handle error in the calling method - Stack Overflow
Generally speaking, I remember four main ways of handling errors in an application: return values (error codes or booleans), exceptions, ...
Read more >Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >How To Handle Errors in a Flask Application - DigitalOcean
In the above code, you first import the Flask class from the flask package. Then you create a Flask application instance called app...
Read more >LEAF - 1.79.0 - Boost C++ Libraries
Boost LEAF is a lightweight error handling library for C++11. Features: Portable single-header format, no dependencies. Tiny code size when configured for ...
Read more >Cancellation in coroutines - Medium
Coroutines handle cancellation by throwing a special exception: ... Rather, we need to modify our code and check if the coroutine is active...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

That was a beautiful repo!
I will create a minimal repo when I’m at the office