dengliming opened a new issue, #606: URL: https://github.com/apache/shenyu-dashboard/issues/606
## Description `handleSubmit` unconditionally formats `values.beginTime` and `values.endTime`, but those two fields are only registered with `getFieldDecorator` when `id === "2"` (time-window policy). For the other policy types the values are `undefined`, so `.format(...)` throws a `TypeError` inside the validate callback and `handleOk` is never called. ## Location (Lines refer to `master @ 83969a5`.) - `src/routes/System/Scale/PolicyModal.js:33-38` (format calls) - `src/routes/System/Scale/PolicyModal.js:167` and the matching `endTime` decorator (conditional registration) ## Impact Editing a Manual (id `1`) or Dynamic (id `3`) scale policy silently does nothing when the user presses OK; the modal stays open and no request is sent. ## Suggested fix Only format the dates when they are present, e.g. `beginTime: values.beginTime ? values.beginTime.format(...) : null` (same for `endTime`), or branch on `id === "2"`. ## Related existing None -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
