From 2973726da8c3e9ab14c6f763f84bd9d8a559818e Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 29 Jun 2016 12:07:25 -0400 Subject: [PATCH] fix uBO misbehaving when corrupted SQL file is corrupted (1st step of the complete fix) --- platform/firefox/vapi-background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 319d13496..0e16221ee 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -418,7 +418,7 @@ vAPI.storage = (function() { console.error('SQLite error ', error.result, error.message); // Caller expects an answer regardless of failure. if ( typeof callback === 'function' ) { - callback(null); + callback({}); } result = null; } @@ -468,7 +468,7 @@ vAPI.storage = (function() { } runStatement(stmt, function(result) { - callback(result.size); + callback(result.size || 0); }); };