Closed Bug 1534804 Opened 7 years ago Closed 7 years ago

JavaScript error "mainDocument is null" on edit page

Categories

(developer.mozilla.org Graveyard :: Editing, enhancement, P1)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwhitlock, Assigned: jwhitlock)

Details

(Keywords: in-triage, Whiteboard: [specification][type:bug])

What did you do?

1. Load the dev tools console in FF 68
2. Go to a wiki page on MDN
3. Click edit

What happened?

The console shows this error:

TypeError: mainDocument is null wiki.6d974031a430.js:formatted:829

What should have happened?

Less JavaScript errors

Is there anything else we should know?

It appears that this is raised in prependLocalAnchors(), which doesn't handle the case where it is not on a wiki page.

https://github.com/mozilla/kuma/blob/26a1259bebe4b6a132bf19bc49add5c413588c29/kuma/static/js/components/local-anchor.js#L10

Assignee: nobody → jwhitlock
Status: NEW → RESOLVED
Closed: 7 years ago
Keywords: in-triage
Priority: -- → P1
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.