Skip to content

Commit

Permalink
Fixed critical recall mode bug
Browse files Browse the repository at this point in the history
  • Loading branch information
netj committed Jan 3, 2015
1 parent 117a20f commit 222a46d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion gui/frontend/src/mindtagger/mindtagger.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,18 @@ angular.module 'mindbenderApp.mindtagger', [
# A controller that sets item and tag to those of the cursor
.controller 'MindtaggerTaskCursorFollowCtrl', ($scope) ->
$scope.$watch 'MindtaggerTask.cursor.index', (cursorIndex) ->
cursor = $scope.MindtaggerTask.cursor
cursor =
if cursorIndex?
$scope.MindtaggerTask.cursor
else
# XXX phantom item/tag for undefined cursors
item: {}
tag: {}
# This can prevent other directives from breaking the $scope,
# e.g., mindtaggerValueSetTag directive configured to work with
# cursor item/tag attributes can create a bogus item/tag in its
# scope shadowing this directive's item/tag if no phantom
# objects are provided here.
$scope.item = cursor.item
$scope.tag = cursor.tag

Expand Down

0 comments on commit 222a46d

Please sign in to comment.