| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 26394cd commit df72dc9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2022,11 +2022,12 @@ function formatArray(ctx, value, recurseTimes) { | |||
| 2022 | 2022 | const remaining = valLen - len; | |
| 2023 | 2023 | const output = []; | |
| 2024 | 2024 | for (let i = 0; i < len; i++) { | |
| 2025 | - // Special handle sparse arrays. | ||
| 2026 | - if (!ObjectPrototypeHasOwnProperty(value, i)) { | ||
| 2025 | + const desc = ObjectGetOwnPropertyDescriptor(value, i); | ||
| 2026 | + if (desc === undefined) { | ||
| 2027 | + // Special handle sparse arrays. | ||
| 2027 | 2028 | return formatSpecialArray(ctx, value, recurseTimes, len, output, i); | |
| 2028 | 2029 | } | |
| 2029 | - ArrayPrototypePush(output, formatProperty(ctx, value, recurseTimes, i, kArrayType)); | ||
| 2030 | + ArrayPrototypePush(output, formatProperty(ctx, value, recurseTimes, i, kArrayType, desc)); | ||
| 2030 | 2031 | } | |
| 2031 | 2032 | if (remaining > 0) { | |
| 2032 | 2033 | ArrayPrototypePush(output, remainingText(remaining)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments