From 109eeb471c0d0811659665dbe668df1b1fb707a6 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Fri, 22 May 2015 14:25:00 +0200 Subject: [PATCH] catch cross-origin exception for local file:// urls (profiles) --- js/Util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/Util.js b/js/Util.js index 0ae6582..993dc5c 100644 --- a/js/Util.js +++ b/js/Util.js @@ -14,7 +14,11 @@ BR.Util = { xhr.onerror = function() { cb(BR.Util.getError(xhr)); }; - xhr.send(); + try { + xhr.send(); + } catch(e) { + cb(e); + } }, getError: function(xhr) {