1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Make ControlParameterIndexUpdater type-safe

This commit is contained in:
m1m0zzz 2025-04-21 16:46:40 +09:00
parent 700f2bcb9a
commit 54d77f76f8

View file

@ -557,7 +557,7 @@ class ControlParameterIndexUpdater {
/** @type {Element | null} */
this.lastElement = null;
/** @type {number} */
this.lastControlParameterIndex = null;
this.lastControlParameterIndex = -1;
}
/**
@ -597,7 +597,7 @@ class ControlParameterIndexUpdater {
while (isValidNonRootElement(element)) {
if (element.hasAttribute(this.controlParameterIndexAnnotation)) {
return element.getAttribute(this.controlParameterIndexAnnotation);
return Number(element.getAttribute(this.controlParameterIndexAnnotation));
}
element = element.parentElement;