From 7e3af4930307bb884b85e9c58f8bcb76eb002688 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 31 May 2015 10:07:07 -0700 Subject: [PATCH] Fix test race condition in Profile merge. --- static/test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/test.js b/static/test.js index 9c8a421..80638d9 100644 --- a/static/test.js +++ b/static/test.js @@ -50,7 +50,9 @@ var logout = function(callback) { return; } if (callback) { - callback(); + // Break the callback out from the message handling flow, so a + // Cosmopolite instance created by the callback doesn't see the message. + window.setTimeout(callback, 100); } };