Refactor element a bit

This commit is contained in:
Talia 2022-03-12 19:51:33 +01:00
parent c3a19d7af8
commit 8d9820cffe
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -41,7 +41,7 @@ export default Class => {
/* Enable batch-processing for dollar-methods */ /* Enable batch-processing for dollar-methods */
/* This would be much nicer if decorators were a thing */ /* This would be much nicer if decorators were a thing */
for (const name of Object.getOwnPropertyNames(Class.prototype)) { for (const name of Object.getOwnPropertyNames(Class.prototype)) {
if (name[0] == "$") { if (name.startsWith("$")) {
const prop = Object.getOwnPropertyDescriptor(Class.prototype, name) const prop = Object.getOwnPropertyDescriptor(Class.prototype, name)
if (typeof prop.value == "function") { if (typeof prop.value == "function") {
const queue = [] const queue = []
@ -52,7 +52,7 @@ export default Class => {
}) })
queue.push(args) queue.push(args)
} }
} };
} }
} }