Skip to content

bug: TypeError: Cannot read properties of null (reading 'nodeType') #6114

@will-hu-0

Description

@will-hu-0

Prerequisites

Stencil Version

4.23.2+

Current Behavior

The code is here: https://stackblitz.com/~/github.com/will-hu-0/stenciljs-demo-issue , a straightforward component with pagination buttons and a list.

It throws TypeError: Cannot read properties of null (reading 'nodeType') when clicking prev or next buttons if using stencil/core V4.23.2 +,

However all is good on V4.23.0.

Image

Expected Behavior

No error is thrown.

System Info

System: node 18.17.1
    Platform: darwin (24.2.0)
   CPU Model: Apple M1 Pro (8 cpus)
    Compiler: /Users/will/Work/zComm/stenciljs-demo-issue/node_modules/@stencil/core/compiler/stencil.js
       Build: 1737085023
     Stencil: 4.24.0 🚜
  TypeScript: 5.5.4
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

After loading the list, click "Previous" or "Next" button.

Code Reproduction URL

https://github.com/will-hu-0/stenciljs-demo-issue

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions