-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix: remove redundant eval trigger #36433
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
Changes from all commits
726c80e
0a18cfe
afee780
69cd49d
087b59f
ba66e4e
dbae30b
4c94c84
957fee4
026ef4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,7 @@ import { useSelector } from "react-redux"; | |
import BrandingBadge from "./BrandingBadge"; | ||
import { setAppViewHeaderHeight } from "actions/appViewActions"; | ||
import { CANVAS_SELECTOR } from "constants/WidgetConstants"; | ||
import { | ||
setupPublishedPage, | ||
fetchPublishedPageResourcesAction, | ||
} from "actions/pageActions"; | ||
import { fetchPublishedPageResources } from "actions/pageActions"; | ||
import usePrevious from "utils/hooks/usePrevious"; | ||
import { getIsBranchUpdated } from "../utils"; | ||
import { APP_MODE } from "entities/App"; | ||
|
@@ -165,10 +162,12 @@ function AppViewer(props: Props) { | |
)?.pageId; | ||
|
||
if (pageId) { | ||
dispatch(setupPublishedPage(pageId, true)); | ||
|
||
// Used for fetching page resources | ||
dispatch(fetchPublishedPageResourcesAction(basePageId)); | ||
dispatch( | ||
fetchPublishedPageResources({ | ||
basePageId, | ||
pageId, | ||
}), | ||
); | ||
Comment on lines
+165
to
+170
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include You've correctly dispatched Here's how you can adjust the dependency array: - }, [branch, basePageId, baseApplicationId, pathname]);
+ }, [branch, basePageId, baseApplicationId, pathname, pages]);
|
||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to use 'yield' when calling functions inside generator functions
In the
updateCanvasLayout
generator function, the call toresizePublishedMainCanvasToLowestWidget
should be yielded to properly handle side effects within the generator.Apply this diff to fix the issue:
Committable suggestion