Skip to content

Commit

Permalink
Fix feedback widget to be visible only on the /listings page
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKranitsas committed Mar 3, 2017
1 parent 2a066ba commit aa5f150
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/listings/listings.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import angular from 'angular'
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams, error) {
if (toState.name !== 'listings') {
// remove usersnap widget if not in listings page
var usersnapWidget = document.getElementById("us_report_button")
if (usersnapWidget) usersnapWidget.remove()
var usersnapWidget = document.querySelectorAll('div[id*="_report_button"]')
if (usersnapWidget && usersnapWidget[0]) usersnapWidget[0].remove()
}
})
}])
Expand Down

0 comments on commit aa5f150

Please sign in to comment.