Skip to content
Snippets Groups Projects
Commit 692605e6 authored by Ben Adida's avatar Ben Adida
Browse files

condition on the unbind handler, otherwise double complete call, part of figuring out issue #589

parent d18505a5
No related branches found
No related tags found
No related merge requests found
...@@ -118,8 +118,12 @@ ...@@ -118,8 +118,12 @@
self.doCheckAuth(); self.doCheckAuth();
dom.bindEvent(win, "unload", function() { dom.bindEvent(win, "unload", function() {
bid.Storage.setStagedOnBehalfOf(""); // do this only if something else hasn't
self.doCancel(); // declared success
if (!self.success) {
bid.Storage.setStagedOnBehalfOf("");
self.doCancel();
}
}); });
}, },
...@@ -277,6 +281,7 @@ ...@@ -277,6 +281,7 @@
// calls window.close, which would trigger the onerror callback if we // calls window.close, which would trigger the onerror callback if we
// tried this afterwards. // tried this afterwards.
self.onerror = null; self.onerror = null;
self.success = true;
self.onsuccess(assertion); self.onsuccess(assertion);
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment