mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 22:09:40 +00:00
Ensure proper handling of null selectedSpace in CommunityStructureCanvas during widget updates to prevent unnecessary processing.
This commit is contained in:
@ -53,6 +53,7 @@ class _CommunityStructureCanvasState extends State<CommunityStructureCanvas>
|
|||||||
@override
|
@override
|
||||||
void didUpdateWidget(covariant CommunityStructureCanvas oldWidget) {
|
void didUpdateWidget(covariant CommunityStructureCanvas oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
|
if (widget.selectedSpace == null) return;
|
||||||
if (widget.selectedSpace?.uuid != oldWidget.selectedSpace?.uuid) {
|
if (widget.selectedSpace?.uuid != oldWidget.selectedSpace?.uuid) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
Reference in New Issue
Block a user