« get me outta code hell

use atOffset() and .at() where appropriate - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-01-14 16:54:45 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-14 16:54:45 -0400
commit6572bd0951d506e4a91366da2ae8d710d5a13a93 (patch)
tree7c95df9fb52eb79ff319e013474ffeae83e79325 /src/util
parent40068a42c31bd25ae62f519146513da5f689c1e7 (diff)
use atOffset() and .at() where appropriate
Diffstat (limited to 'src/util')
-rw-r--r--src/util/replacer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/replacer.js b/src/util/replacer.js
index a2df2c3f..d9fd8923 100644
--- a/src/util/replacer.js
+++ b/src/util/replacer.js
@@ -287,7 +287,7 @@ export function postprocessImages(inputNodes) {
 
   let atStartOfLine = true;
 
-  const lastNode = inputNodes[inputNodes.length - 1];
+  const lastNode = inputNodes.at(-1);
 
   for (const node of inputNodes) {
     if (node.type === 'tag') {