Skip to content

Commit

Permalink
Don't remove surveyChecks unless addon is uninstalled
Browse files Browse the repository at this point in the history
- refs mozilla#1006
- only call `survey.destroy()` if the addon is being `uninstalled`
we have been calling on `unload`.
  • Loading branch information
meandavejustice committed Jun 28, 2016
1 parent 2dd3276 commit 56fece2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,14 @@ exports.onUnload = function(reason) {
panel.destroy();
button.destroy();
Metrics.destroy();
survey.destroy();

if (reason === 'uninstall' || reason === 'disable') {
Metrics.onDisable();
}

if (reason === 'uninstall') {
survey.destroy();

if (store.installedAddons) {
Object.keys(store.installedAddons).forEach(id => {
uninstallExperiment({addon_id: id});
Expand Down

0 comments on commit 56fece2

Please sign in to comment.