Explorar o código

Fix undefined variables errors

Maxime Quandalle %!s(int64=9) %!d(string=hai) anos
pai
achega
77069a36cd
Modificáronse 2 ficheiros con 6 adicións e 3 borrados
  1. 5 2
      client/components/boards/boardBody.js
  2. 1 1
      client/lib/inlinedform.js

+ 5 - 2
client/components/boards/boardBody.js

@@ -163,8 +163,11 @@ Template.boardBody.onRendered(function() {
   // Disable drag-dropping while in multi-selection mode, or if the current user
   // Disable drag-dropping while in multi-selection mode, or if the current user
   // is not a board member
   // is not a board member
   self.autorun(() => {
   self.autorun(() => {
-    $(self.listsDom).sortable('option', 'disabled',
-      MultiSelection.isActive() || !userIsMember());
+    const $listDom = $(self.listsDom);
+    if ($listDom.data('sortable')) {
+      $(self.listsDom).sortable('option', 'disabled',
+        MultiSelection.isActive() || !userIsMember());
+    }
   });
   });
 
 
   // If there is no data in the board (ie, no lists) we autofocus the list
   // If there is no data in the board (ie, no lists) we autofocus the list

+ 1 - 1
client/lib/inlinedform.js

@@ -29,7 +29,7 @@ InlinedForm = BlazeComponent.extendComponent({
   },
   },
 
 
   open(evt) {
   open(evt) {
-    evt.preventDefault();
+    evt && evt.preventDefault();
 
 
     // Close currently opened form, if any
     // Close currently opened form, if any
     EscapeActions.executeUpTo('inlinedForm');
     EscapeActions.executeUpTo('inlinedForm');