From 93877561098025fbbf7e695961342a6647dbf188 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 23 Jan 2022 00:00:53 -0500 Subject: [PATCH] mix format --- assets/js/maintain_attrs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/maintain_attrs.js b/assets/js/maintain_attrs.js index 68ba6d1..f4ff238 100644 --- a/assets/js/maintain_attrs.js +++ b/assets/js/maintain_attrs.js @@ -2,7 +2,7 @@ // update. https://github.com/phoenixframework/phoenix_live_view/issues/1011 export default { - attrs(){ return this.el.getAttribute("data-attrs").split(", ") }, - beforeUpdate(){ this.prevAttrs = this.attrs().map(name => [name, this.el.getAttribute(name)]) }, - updated(){ this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)) } + attrs () { return this.el.getAttribute('data-attrs').split(', ') }, + beforeUpdate () { this.prevAttrs = this.attrs().map(name => [name, this.el.getAttribute(name)]) }, + updated () { this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)) } }