Skip to content

Commit a01fd8c

Browse files
committed
misc minor fixes
1 parent 55e03cf commit a01fd8c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cases/common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ const guiParams = {};
285285
* The `id` and `values` will show up in the url
286286
* @param {string} id Id
287287
* @param {string} label Label
288-
* @param {Array<string>|Array<number>} values Either two string values for true/false, or two numbers defining a range
288+
* @param {Array<string>|Array<number>} values Either two string values for true/false, or two numbers defining a range + optional step value
289289
* @param {boolean|number|function(): void} defaultValue Default value
290290
* @param {function(boolean|number|function(): void, boolean|null): void} callback Called when the parameter changes, and also on initialization
291291
* First argument is the current value, second argument is true if this is the initial call
@@ -454,6 +454,7 @@ function animate() {
454454
}, 1000);
455455
}
456456

457+
/** @type {string} */
457458
export const olVersion =
458459
new URL(window.location.href).searchParams.get('olVersion') ??
459460
// @ts-ignore

cases/vector-tiles-rendering/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function generateStyle() {
3434
defaultStylesCount;
3535

3636
// use a single style rule for OpenLayers versions < 10.4.1
37-
if (compareVersions(olVersion, '10.4.1') < 0) {
37+
if (olVersion.match(/^[0-9]/) && compareVersions(olVersion, '10.4.1') < 0) {
3838
const colorExpr = [
3939
'match',
4040
['get', 'propValue'],

0 commit comments

Comments
 (0)