[gnome-documents/wip/rishi/onedrive: 1/8] selections: Be more strict about invalid code paths



commit 3357fc2e3f52ce89b350e056e3103700c05159df
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Mar 27 18:11:30 2017 +0200

    selections: Be more strict about invalid code paths

 src/selections.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/selections.js b/src/selections.js
index f1f8bbe..2d87540 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -977,7 +977,7 @@ const SelectionToolbar = new Lang.Class({
     _onToolbarCollection: function() {
         let toplevel = this.get_toplevel();
         if (!toplevel.is_toplevel())
-            return;
+            throw(new Error('Code should not be reached'));
 
         let dialog = new OrganizeCollectionDialog(toplevel);
         dialog.connect('destroy', Lang.bind(this, function() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]