fix: satisfy the production type check for the market chart and home banner
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -101,7 +101,7 @@ const chartOptions = computed(() => {
|
|||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
display: true,
|
display: true,
|
||||||
position: 'right',
|
position: 'right' as const,
|
||||||
min: domain.min,
|
min: domain.min,
|
||||||
max: domain.max,
|
max: domain.max,
|
||||||
grid: { display: false },
|
grid: { display: false },
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ const nextMissionLines = computed(() => {
|
|||||||
let bestDiff = Number.POSITIVE_INFINITY
|
let bestDiff = Number.POSITIVE_INFINITY
|
||||||
let used = 0
|
let used = 0
|
||||||
for (let index = 0; index < words.length - 1; index += 1) {
|
for (let index = 0; index < words.length - 1; index += 1) {
|
||||||
used += words[index].length + (index > 0 ? 1 : 0)
|
const word = words[index]
|
||||||
|
if (!word) continue
|
||||||
|
used += word.length + (index > 0 ? 1 : 0)
|
||||||
const diff = Math.abs(used - total / 2)
|
const diff = Math.abs(used - total / 2)
|
||||||
if (diff < bestDiff) {
|
if (diff < bestDiff) {
|
||||||
bestDiff = diff
|
bestDiff = diff
|
||||||
|
|||||||
Reference in New Issue
Block a user