Error: Cannot read properties of null (reading 'addEventListener') on query with template

I get:

Error: Cannot read properties of null (reading 'addEventListener')

when I do a System -> Reload. this only occurs when there’s a query that uses a template in the current page (index.md), like this one:

${template.each(query[[
  from index.tag "page"
  order by lastModified desc
  limit 3
]], templates.pageItem)}

Pointers appreciated.

Very odd, is there anything useful to be found in your browser’s JavaScript console? What this smells like is some sort of odd page object in your index. Did you by any chance use a #page hashtag anywhere in your space?