Templarian/MaterialDesign-Site

Check for existence of #carbon element

Closed this issue · 2 comments

The following line in bundle.js is preventing other JS in the admin from executing as the #carbon element doesn't exist in the admin:

document.getElementById("carbon").appendChild(n)

Adding some sort of conditional to check for the existence of #carbon should rectify it.

Turns out that wasn't the problem at all! Although it wouldn't hurt to add the conditional anyway.

No longer using html ids anywhere in the HTML now. Using the correct ElementRef reference.