Skip to content

Commit

Permalink
unbind old ytext value
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Dec 17, 2016
1 parent 8e6500c commit 8db406c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ace-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@
/**
* Bind this editor to a [Y.Text](https://github.com/y-js/y-text) type
*/
bindYText: function (ytext) {
bindYText: function (ytext, old) {
if (old != null && old.type != null && old.type.unbindAll != null) {
old.type.unbindAceAll()
}
if (ytext != null) {
if (ytext.type != null) {
ytext = ytext.type
Expand Down

0 comments on commit 8db406c

Please sign in to comment.