Skip to content

Commit

Permalink
Merge pull request #101 from phildrip/master
Browse files Browse the repository at this point in the history
Fixed error when treeData is an object (not an array).
  • Loading branch information
nickperkinslondon authored Mar 3, 2017
2 parents dda6b54 + 7762e16 commit e840f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/abn_tree_directive.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ module.directive 'abnTree',['$timeout',($timeout)->
return

if !scope.treeData.length?
if treeData.label?
scope.treeData = [ treeData ]
if scope.treeData.label?
scope.treeData = [ scope.treeData ]
else
alert 'treeData should be an array of root branches'
return
Expand Down

0 comments on commit e840f9e

Please sign in to comment.