From a68c683740034f0d8446a9d68ba45aa2a5693742 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Sat, 25 Nov 2023 08:21:54 +0100 Subject: [PATCH] rename func --- src/fontra/client/core/discrete-variation-model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fontra/client/core/discrete-variation-model.js b/src/fontra/client/core/discrete-variation-model.js index 1f7567c1a..89906c87f 100644 --- a/src/fontra/client/core/discrete-variation-model.js +++ b/src/fontra/client/core/discrete-variation-model.js @@ -88,7 +88,7 @@ function splitDiscreteLocation(location, discreteAxes) { delete location[axis.name]; if (axis.values.indexOf(value) < 0) { // Ensure the value is actually in the values list - value = findNearest(value, axis.values); + value = findNearestValue(value, axis.values); } } else { value = axis.defaultValue; @@ -98,7 +98,7 @@ function splitDiscreteLocation(location, discreteAxes) { return { discreteLocation, location }; } -function findNearest(value, values) { +function findNearestValue(value, values) { if (!values.length) { return value; }