refinedev / refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
https://refine.dev
MIT License
27.72k stars 2.15k forks source link

fix(devtools-internal): fix `NODE_ENV` conditional #5992

Closed aliemir closed 4 months ago

aliemir commented 4 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

Changes

When using Refine with React Native, process.env.NODE_ENV !== "development" ? () => ({}) : () => {...} conditional in useQuerySubscription hook was causing a syntax error. This PR fixes the issue by explicitly returning an empty object on non-development environments.

Screenshot 2024-05-27 at 11 19 10

Not sure why this happens but using parentheses to return an empty object throws syntax error on React Native environment.

RK-671

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 4654353b90b6a09cbf65e41d4c1fa82553a2a3fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ---------------------------- | ----- | | @refinedev/devtools-internal | Patch | | @refinedev/core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

cypress[bot] commented 4 months ago

Passing run #11140 ↗︎

0 379 37 0 Flakiness 0

Details:

Merge 4654353b90b6a09cbf65e41d4c1fa82553a2a3fa into 3f4dea97e1059baeb5a269533541...
Project: refine Commit: 2c7608b33a ℹ️
Status: Passed Duration: 21:50 💡
Started: May 27, 2024 8:36 AM Ended: May 27, 2024 8:58 AM

Review all test suite changes for PR #5992 ↗︎