fix: miscellaneous quick fixes from CodeRabbit review
- log_info_generate.go: add nil guard in InjectTieredBillingInfo - billing_expr_request.go: merge headers instead of replacing - go.mod: remove incorrect // indirect on expr-lang/expr - ToolPriceSettings.jsx: add null check in syncToVisual - tool_billing.go: fix PricePer1K for image_generation (per-call, not per-1K) - utils.jsx: add minute() to time condition regex - useUsageLogsData.jsx: pass displayMode to renderTieredModelPrice - AGENTS.md, CLAUDE.md: fix Rule 6/7 ordering - relay-gemini.go: add TEXT modality case in CandidatesTokensDetails
This commit is contained in:
@@ -102,7 +102,7 @@ export default function ToolPriceSettings({ options }) {
|
||||
setJsonText(text);
|
||||
try {
|
||||
const parsed = JSON.parse(text);
|
||||
if (typeof parsed !== 'object' || Array.isArray(parsed)) {
|
||||
if (typeof parsed !== 'object' || Array.isArray(parsed) || parsed === null) {
|
||||
setJsonError(t('JSON 必须是对象'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user