fix: type error in list-operator (#22803)

This commit is contained in:
呆萌闷油瓶 2025-07-24 12:21:20 +08:00 committed by GitHub
parent c6d7328e15
commit 371fe7a700
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 8 deletions

View File

@ -184,11 +184,10 @@ class ListOperatorNode(BaseNode):
value = int(self.graph_runtime_state.variable_pool.convert_template(self._node_data.extract_by.serial).text)
if value < 1:
raise ValueError(f"Invalid serial index: must be >= 1, got {value}")
if value > len(variable.value):
raise InvalidKeyError(f"Invalid serial index: must be <= {len(variable.value)}, got {value}")
value -= 1
if len(variable.value) > int(value):
result = variable.value[value]
else:
result = ""
result = variable.value[value]
return variable.model_copy(update={"value": [result]})

View File

@ -18,7 +18,6 @@ const OptionListItem: FC<OptionListItemProps> = ({
useEffect(() => {
if (isSelected && !noAutoScroll)
listItemRef.current?.scrollIntoView({ behavior: 'instant' })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
return (

View File

@ -52,7 +52,6 @@ const TimePicker = ({
else {
setSelectedTime(prev => prev ? getDateWithTimezone({ date: prev, timezone }) : undefined)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [timezone])
const handleClickTrigger = (e: React.MouseEvent) => {

View File

@ -117,7 +117,6 @@ const PluginPage = ({
showInstallFromMarketplace()
}
})()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [packageId, bundleInfo])
const {

View File

@ -519,7 +519,6 @@ export const usePluginTaskList = (category?: PluginType) => {
refreshPluginList(category ? { category } as any : undefined, !category)
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isRefetching])
const handleRefetch = useCallback(() => {