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