Skip to content

Commit 4c2fbab

Browse files
Merge pull request #175 from joostbaptist/master
Check if element exists before updating model view
2 parents ca9f025 + 0119824 commit 4c2fbab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/angular-froala.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@
154154
};
155155

156156
ctrl.updateModelView = function() {
157+
if (!element) {
158+
return;
159+
}
157160

158161
var modelContent = null;
159162

@@ -229,4 +232,4 @@
229232
}
230233
};
231234
}]);
232-
})(window, window.angular, window.jQuery);
235+
})(window, window.angular, window.jQuery);

0 commit comments

Comments
 (0)