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: {
|
||||
display: true,
|
||||
position: 'right',
|
||||
position: 'right' as const,
|
||||
min: domain.min,
|
||||
max: domain.max,
|
||||
grid: { display: false },
|
||||
|
||||
@@ -36,7 +36,9 @@ const nextMissionLines = computed(() => {
|
||||
let bestDiff = Number.POSITIVE_INFINITY
|
||||
let used = 0
|
||||
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)
|
||||
if (diff < bestDiff) {
|
||||
bestDiff = diff
|
||||
|
||||
Reference in New Issue
Block a user