We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f91f10a commit 7655f0cCopy full SHA for 7655f0c
src/utils.js
@@ -260,13 +260,10 @@ const byteToHex = [
260
const fastArrayJoin = (array, separator = '') => {
261
const length = array.length
262
let result = ''
263
- let firstAdded = false
+ const last = length - 1
264
for (let i = 0; i < length; i++) {
265
- if (array[i] === undefined || array[i] === null) continue
266
-
267
- result += firstAdded ? separator + array[i] : array[i]
268
269
- if (!firstAdded) firstAdded = true
+ const value = array[i] === undefined || array[i] === null ? '' : array[i]
+ result += i !== last ? value + separator : value
270
}
271
return result
272
0 commit comments