| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 048349e commit cd891b3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,7 @@ const { | |||
| 21 | 21 | StringPrototypeValueOf, | |
| 22 | 22 | SymbolPrototypeValueOf, | |
| 23 | 23 | TypedArrayPrototypeGetSymbolToStringTag, | |
| 24 | + TypedArrayPrototypeGetByteLength, | ||
| 24 | 25 | Uint8Array, | |
| 25 | 26 | } = primordials; | |
| 26 | 27 | ||
@@ -71,7 +72,8 @@ function areSimilarFloatArrays(a, b) { | |||
| 71 | 72 | if (a.byteLength !== b.byteLength) { | |
| 72 | 73 | return false; | |
| 73 | 74 | } | |
| 74 | - for (let offset = 0; offset < a.byteLength; offset++) { | ||
| 75 | + const len = TypedArrayPrototypeGetByteLength(a); | ||
| 76 | + for (let offset = 0; offset < len; offset++) { | ||
| 75 | 77 | if (a[offset] !== b[offset]) { | |
| 76 | 78 | return false; | |
| 77 | 79 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments