Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Normalize behavior of query definition #1450

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Merkur39
Copy link
Member

@Merkur39 Merkur39 commented Mar 1, 2024

Cette PR fait suite à cette issue #1367

Le fix de la JSDoc a mis en évidence une incohérence dans une condition (pour un log) du useQuery (https://github.com/cozy/cozy-client/compare/fix/ver-329?expand=1#diff-f6c79185f6ddf5d8fefc83938515c50a323cc9ebe2b1d1724c15a226008a273dR54)

Sachant que la queryDefinition peut être une fonction, dans ce cas cette condition ne sera jamais vrai.

As we can see inside this function, the `queryDefinition`
param can be a function.
@cballevre
Copy link
Contributor

@Merkur39 I have the feeling that this commit that I merged recently corrects part of what you wanted to do in this PR

@@ -90,6 +90,9 @@ const securiseUri = uri => {

return uri
}
const resolveToValue = fnOrValue => {
return typeof fnOrValue === 'function' ? fnOrValue() : fnOrValue
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is already defined here, some mutualization would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants