Skip to content

Commit

Permalink
Fix undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
edudouglas committed Aug 14, 2018
1 parent 08d7166 commit 7bb6a01
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions static/coffee/flows/controllers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1470,14 +1470,15 @@ NodeEditorController = ($rootScope, $scope, $modalInstance, $timeout, $log, Flow

modalResize = () ->
modal = angular.element(document.querySelector('#modal-dialog'))
modal.context.style.width = '660px'
modal.context.style.marginLeft = '-330px'

for rule in $scope.ruleset.rules
if rule._config.type == 'has_intent'
modal.context.style.width = '823px'
modal.context.style.marginLeft = '-448px'
break
if modal.context
modal.context.style.width = '660px'
modal.context.style.marginLeft = '-330px'

for rule in $scope.ruleset.rules
if rule._config.type == 'has_intent'
modal.context.style.width = '823px'
modal.context.style.marginLeft = '-448px'
break

checkModalHasIntent = $scope.$watch (->$modalInstance.opened), ->
modalResize()
Expand Down

0 comments on commit 7bb6a01

Please sign in to comment.