Skip to content

Commit

Permalink
Fix bug querying null parent element
Browse files Browse the repository at this point in the history
  • Loading branch information
adlawson committed Nov 13, 2016
1 parent fde7041 commit 94833cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ browser.onChange(browser.querySelector('[m-contents="maincontent"]'), main);

function main() {
const parent = browser.querySelector('[ng-controller="CloudcastHeaderCtrl"]');
const empty = parent.querySelector('[ng-init]');
if (parent !== null) {
fetchData(window.location, (data) => {
const tracklistTemplate = require('./templates/tracklist')(dust); // Required by both new and legacy
const empty = parent.querySelector('[ng-init]');
if (isLegacy()) {
render(require('./templates/legacy')(dust), data.cloudcast, html => {
browser.replace(parent, empty, html);
Expand Down

0 comments on commit 94833cf

Please sign in to comment.