mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
fix(editor): add missing zod schema for edgeless frame (#10024)
Related to https://github.com/toeverything/AFFiNE/pull/9970#discussion_r1944971309 ### What changes: - Add missing zod shcema for edgeless basic props - Change `applyLastProps` to generic function for better return type inference of - Fix: add `ZodIntersection` case to `makeDeepOptional`
This commit is contained in:
@@ -139,7 +139,10 @@ export class EditPropsStore extends LifeCycleWatcher {
|
||||
}
|
||||
}
|
||||
|
||||
applyLastProps(key: LastPropsKey, props: Record<string, unknown>) {
|
||||
applyLastProps<K extends LastPropsKey>(
|
||||
key: K,
|
||||
props: Record<string, unknown>
|
||||
) {
|
||||
if (['__proto__', 'constructor', 'prototype'].includes(key)) {
|
||||
throw new BlockSuiteError(
|
||||
ErrorCode.DefaultRuntimeError,
|
||||
|
||||
Reference in New Issue
Block a user