From 8d9820cffee21457023f3d949b42ad909e8359e4 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Sat, 12 Mar 2022 19:51:33 +0100 Subject: [PATCH] Refactor element a bit --- element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/element.js b/element.js index dee8cbb..4b41afa 100644 --- a/element.js +++ b/element.js @@ -41,7 +41,7 @@ export default Class => { /* Enable batch-processing for dollar-methods */ /* This would be much nicer if decorators were a thing */ for (const name of Object.getOwnPropertyNames(Class.prototype)) { - if (name[0] == "$") { + if (name.startsWith("$")) { const prop = Object.getOwnPropertyDescriptor(Class.prototype, name) if (typeof prop.value == "function") { const queue = [] @@ -52,7 +52,7 @@ export default Class => { }) queue.push(args) } - } + }; } }