only set watch on attrs.layoutDisabled when attribute is defined

This commit is contained in:
Brian Gough 2015-01-23 20:37:02 +00:00
parent 0453c657da
commit e62a2c7a6f

View file

@ -103,12 +103,12 @@ define [
resetOpenStates() resetOpenStates()
onInternalResize() onInternalResize()
scope.$watch attrs.layoutDisabled, (value) -> if attrs.layoutDisabled?
if value scope.$watch attrs.layoutDisabled, (value) ->
element.layout().hide("east") if value
else element.layout().hide("east")
element.layout().show("east") else
element.layout().show("east")
} }
] ]