Closed
Bug 1514170
Opened 6 years ago
Closed 6 years ago
$(...)[0] is undefined in panel.js:121:5
Categories
(Webtools :: Searchfox, defect)
Webtools
Searchfox
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: freddy, Assigned: freddy)
Details
Attachments
(1 file)
I get this error in the console:
> TypeError: $(...)[0] is undefined[Learn More] panel.js:121:5
The code around the error is as follows:
> // If the user toggles the checkbox let's update the state accordingly.
> $('#panel-accel-enable')[0].addEventListener('change', () => {
> var newState = ($('#panel-accel-enable')[0].checked);
> updateAccelerators(newState);
> });
| Assignee | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
What URL are you seeing this on? The panel.js code should only be getting included on patches that have the checkbox. If the checkbox isn't there it might be a different bug somewhere.
Flags: needinfo?(fbraun)
| Assignee | ||
Comment 3•6 years ago
|
||
I get it on <https://searchfox.org/> directly
Flags: needinfo?(fbraun)
Comment 4•6 years ago
|
||
So I think removing panel.js from https://github.com/mozsearch/mozsearch/blob/dbfae5e0817254ba3b043ad482f55d6cae251e06/scripts/output.js#L137 would work too since I believe that file is only used by pages that don't actually have panels. But I guess in the future we might want to add panels there too so the approach in your patch is fine too.
Comment 5•6 years ago
|
||
Comment on attachment 9031369 [details] [review]
GitHub Pull Request
Minusing for now because of https://github.com/mozsearch/mozsearch/pull/171#issuecomment-449208703
Attachment #9031369 -
Flags: review?(kats) → review-
Comment 6•6 years ago
|
||
This landed a while ago
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•