From 599d572f3a24545291e5a9f01649dc316326f5b6 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 10 May 2016 17:02:38 +0300 Subject: [PATCH] fixed a minor error... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/core.js | 8 ++++++-- ui (gen4)/features/ui.js | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/core.js b/ui (gen4)/features/core.js index 9aa21f2e..afd7b3db 100755 --- a/ui (gen4)/features/core.js +++ b/ui (gen4)/features/core.js @@ -8,7 +8,8 @@ define(function(require){ var module = {} -//var DEBUG = DEBUG != null ? DEBUG : true +// XXX +var DEBUG = typeof(DEBUG) != 'undefined' ? DEBUG : true var actions = require('lib/actions') var features = require('lib/features') @@ -157,7 +158,10 @@ var LifeCycleActions = actions.Actions({ // in case something breaks exit... // XXX not sure if this is correct... } catch(e){ - this.close(true) + console.log('ERROR:', e) + + DEBUG || nw.App.quit() + //this.close(true) } } nw.Window.get().on('close', this.__nw_stop_handler) diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js index 123cec60..8f7197b7 100755 --- a/ui (gen4)/features/ui.js +++ b/ui (gen4)/features/ui.js @@ -1935,7 +1935,8 @@ var ControlActions = actions.Actions({ this.data.ribbon_order.forEach(function(gid){ var r = that.ribbons.getRibbon(gid) - r.data('hammer').destroy() + var h = r.data('hammer') + h && h.destroy() r .removeClass('draggable') @@ -1986,7 +1987,8 @@ var ControlActions = actions.Actions({ // off... } else { - viewer.data('hammer').destroy() + var h = viewer.data('hammer') + h && h.destroy() viewer .removeClass('swipable')