From af5cc30381b68f67d2cb1c08c4da22b6f301780e Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 2 Jul 2018 10:51:27 +0200 Subject: [PATCH] Fix undefined function when calling error() in the drive --- www/common/userObject.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index fb39eb484..d97607c1a 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -37,7 +37,14 @@ define([ var logError = config.logError || logging; var debug = exp.debug = config.debug || logging; var error = exp.error = function() { - exp.fixFiles(); + if (sframeChan) { + return void sframeChan.query("Q_DRIVE_USEROBJECT", { + cmd: "fixFiles", + data: {} + }, function () {}); + } else if (typeof (exp.fixFiles) === "function") { + exp.fixFiles(); + } console.error.apply(console, arguments); };