Skip to content

Commit

Permalink
fix: fix Widget value if widget is not WysiwygWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Apr 20, 2022
1 parent d574054 commit e39178e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/MultilingualWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ const MultilingualWidget = (Widget = WysiwygWidget, defaultValue = '') => ({
<Widget
id={`multilingual-text-${token}-${id}`}
placeholder={intl.formatMessage(messages.placeholder)}
value={{ data: valueObj[token] ?? defaultValue }}
value={
Widget === WysiwygWidget
? { data: valueObj[token] ?? defaultValue }
: valueObj[token] ?? defaultValue
}
title={title}
description={description}
onChange={handleChangeLangValue(token)}
Expand Down

0 comments on commit e39178e

Please sign in to comment.