We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 407273e commit 08c33d7Copy full SHA for 08c33d7
index.js
@@ -28,11 +28,13 @@ export default {
28
},
29
methods: {
30
paint: function () {
31
- render(this.$el.parentNode.insertBefore(this._ = document.createElement('span'), this.$el).appendChild(this.$el), (function(_this) {
32
- return function (el) {
33
- _this.$el.parentNode.replaceChild(el, _this.$el)
34
- }
35
- })(this))
+ (function ($el, _) {
+ render($el.parentNode.insertBefore(_, $el).appendChild($el), function (el) {
+ try {
+ _.replaceChild(el, $el)
+ } catch (_) {}
36
+ })
37
+ })(this.$el, this._ = document.createElement('span'))
38
39
reset: function () {
40
this._.parentNode.replaceChild(this.$el, this._)
0 commit comments