-
Notifications
You must be signed in to change notification settings - Fork 841
Description
Jetstream Version
5.0.5
Jetstream Stack
Inertia
Laravel Version
11.6.0
PHP Version
8.3
Database Driver & Version
No response
Description
We're using jetstream and had a issue when we were loading in a certain amount (in our case 100 Resources on a overview) of data we got the following javascript error in the console:
Uncaught (in promise)
TypeError: Cannot read properties of null (reading 'dataset')
at Qb (app-CvG2p1gB.js:98:25466)
at app-CvG2p1gB.js:102:16565After some research I stumbled upon this laracast item: https://laracasts.com/discuss/channels/inertia/inertiajs-vuejs-3-typescript-got-error-cannot-read-properties-of-null-reading-dataset and tried the mentioned solution of switching the order of the script tags in the app.blade.
Before:
@routes(nonce: Vite::cspNonce())
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
@inertiaHeadAfter:
@routes(nonce: Vite::cspNonce())
@inertiaHead
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])In our case this seemed to have resolved the issue, which got me wondering if there is a reason this is not the default in the jetstream app.blade.php file.
Steps To Reproduce
Unfortunately I did not find the specific root cause or trigger to make a public reproducable repository.