fixed a minor error...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-05-10 17:02:38 +03:00
parent 63c14f7c4f
commit 599d572f3a
2 changed files with 10 additions and 4 deletions

View File

@ -8,7 +8,8 @@
define(function(require){ var module = {} 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 actions = require('lib/actions')
var features = require('lib/features') var features = require('lib/features')
@ -157,7 +158,10 @@ var LifeCycleActions = actions.Actions({
// in case something breaks exit... // in case something breaks exit...
// XXX not sure if this is correct... // XXX not sure if this is correct...
} catch(e){ } 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) nw.Window.get().on('close', this.__nw_stop_handler)

View File

@ -1935,7 +1935,8 @@ var ControlActions = actions.Actions({
this.data.ribbon_order.forEach(function(gid){ this.data.ribbon_order.forEach(function(gid){
var r = that.ribbons.getRibbon(gid) var r = that.ribbons.getRibbon(gid)
r.data('hammer').destroy() var h = r.data('hammer')
h && h.destroy()
r r
.removeClass('draggable') .removeClass('draggable')
@ -1986,7 +1987,8 @@ var ControlActions = actions.Actions({
// off... // off...
} else { } else {
viewer.data('hammer').destroy() var h = viewer.data('hammer')
h && h.destroy()
viewer viewer
.removeClass('swipable') .removeClass('swipable')