diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-30 09:14:29 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-30 09:14:29 -0300 |
commit | 6eaa070e5c036ba8cd45f79c16dc2732b40ea480 (patch) | |
tree | 640a68d059a992dad04e8d3f21831aab4c4b3931 /src/data | |
parent | 13b25a8d48d142b60d5c351aad4ad1bf80104320 (diff) |
data, util: hsmusic.sugar.index -> hsmusic.decorate.indexInSourceArray
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things/validators.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/data/things/validators.js b/src/data/things/validators.js index ba62fb84..bdb22058 100644 --- a/src/data/things/validators.js +++ b/src/data/things/validators.js @@ -174,7 +174,8 @@ function validateArrayItemsHelper(itemValidator) { throw new Error(`Expected validator to return true`); } } catch (error) { - error.message = `(index: ${colors.yellow(`#${index}`)}, item: ${inspect(item)}) ${error.message}`; + error.message = `(index: ${colors.yellow(`${index}`)}, item: ${inspect(item)}) ${error.message}`; + error[Symbol.for('hsmusic.decorate.indexInSourceArray')] = index; throw error; } }; |