From e1e19cbd03086c529d7351be68513ac082e83079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Thu, 4 Aug 2022 23:32:26 +0200 Subject: [PATCH] Remove workaround for missing TypedArray.from function --- src/ol/webgl/Buffer.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ol/webgl/Buffer.js b/src/ol/webgl/Buffer.js index d29a08d8b4..b0007bfacf 100644 --- a/src/ol/webgl/Buffer.js +++ b/src/ol/webgl/Buffer.js @@ -74,14 +74,11 @@ class WebGLArrayBuffer { } /** - * Populates the buffer with an array of the given size (all values will be zeroes). + * Populates the buffer with an array of the given size. * @param {Array} array Numerical array */ fromArray(array) { - const arrayClass = getArrayClassForType(this.type); - this.array = arrayClass.from - ? arrayClass.from(array) - : new arrayClass(array); + this.array = getArrayClassForType(this.type).from(array); } /**