Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

Commit 8c19bf4

Browse files
takaokoujiGemini
andcommitted
fix: update messages PropType to allow objects
- Updated 'messages' PropType to allow values that are either strings or objects - This fixes the React PropType warning when opening the connection modal, where format-message transforms message strings into objects. Co-Authored-By: Gemini <noreply@google.com>
1 parent 9a2f5cc commit 8c19bf4

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/containers/blocks.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,10 @@ Blocks.propTypes = {
741741
isRtl: PropTypes.bool,
742742
isVisible: PropTypes.bool,
743743
locale: PropTypes.string.isRequired,
744-
messages: PropTypes.objectOf(PropTypes.string),
744+
messages: PropTypes.objectOf(PropTypes.oneOfType([
745+
PropTypes.string,
746+
PropTypes.object
747+
])),
745748
onActivateColorPicker: PropTypes.func,
746749
onActivateCustomProcedures: PropTypes.func,
747750
onOpenConnectionModal: PropTypes.func,

src/lib/vm-manager-hoc.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ const vmManagerHOC = function (WrappedComponent) {
110110
isStarted: PropTypes.bool,
111111
loadingState: PropTypes.oneOf(LoadingStates),
112112
locale: PropTypes.string,
113-
messages: PropTypes.objectOf(PropTypes.string),
113+
messages: PropTypes.objectOf(PropTypes.oneOfType([
114+
PropTypes.string,
115+
PropTypes.object
116+
])),
114117
onError: PropTypes.func,
115118
onLoadedProject: PropTypes.func,
116119
onSetProjectUnchanged: PropTypes.func,

0 commit comments

Comments
 (0)