Skip to content

Commit e29c1c2

Browse files
Adam-MaciugaArekBalysNordic
authored andcommitted
bugfix: cluster code forced to 0
Fixed bug that forced cluster code to 0 This bug happens when loading cluster extension Signed-off-by: Adam Maciuga <adam.maciuga@nordicsemi.no>
1 parent 335b005 commit e29c1c2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/app/SidePanel/Buttons.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,10 @@ const OpenSavePanelButtons = () => {
151151
validationResult.extensions
152152
.length === 1
153153
) {
154-
// Single extension, auto-load it
155-
ClusterFile.initializeExtension(
156-
validationResult.extensions[0],
157-
0
158-
);
154+
// Single extension: loadExtension() already called
155+
// initializeExtension(); do not call it again or the
156+
// code would be zeroed by stale React state in saveCurrentChanges().
159157
}
160-
161158
// Emit event to update side panel
162159
eventEmitter.emit(
163160
'availableItemsChanged'

0 commit comments

Comments
 (0)