Fix name-availability-check for Reposts

3f805a61 broke Reposts. The action needs to return whether there are any clashes.
This commit is contained in:
infinite-persistence 2022-04-18 18:32:00 +08:00
parent 65789a26ed
commit 82f278dbde
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -1024,10 +1024,12 @@ export function doCheckPublishNameAvailability(name: string) {
useAutoPagination: true,
}
)
).then(() => {
).then((result) => {
dispatch({
type: ACTIONS.CHECK_PUBLISH_NAME_COMPLETED,
});
return Object.keys(result).length === 0;
});
};
}