From e893b0342892154725f45aa66cd6a5f401874ab8 Mon Sep 17 00:00:00 2001 From: Petar Guglev Date: Thu, 27 Jul 2023 13:24:15 +0300 Subject: [PATCH] Fix invalid ArrayBuffer.prototype.slice() usage (#28212) --- files/en-us/web/api/gpubuffer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/gpubuffer/index.md b/files/en-us/web/api/gpubuffer/index.md index fb0cc8ce08c795c..601fd605d9dd8fa 100644 --- a/files/en-us/web/api/gpubuffer/index.md +++ b/files/en-us/web/api/gpubuffer/index.md @@ -69,7 +69,7 @@ await stagingBuffer.mapAsync( ); const copyArrayBuffer = stagingBuffer.getMappedRange(0, BUFFER_SIZE); -const data = copyArrayBuffer.slice(); +const data = copyArrayBuffer.slice(0); stagingBuffer.unmap(); console.log(new Float32Array(data)); ```