easy-email-pro-theme 1.51.3 → 1.51.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +20 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -16086,12 +16086,21 @@ const FontSize$2 = () => {
16086
16086
  const [fontSizeValue, setFontSizeValue] = useState();
16087
16087
  const { setFieldValue } = useEditorContext();
16088
16088
  const editor = useSlate();
16089
- const [nodeEntry] = Editor.nodes(editor, {
16089
+ let [nodeEntry] = Editor.nodes(editor, {
16090
16090
  match: (node) => {
16091
16091
  return Text$2.isText(node);
16092
16092
  },
16093
16093
  mode: "lowest"
16094
16094
  });
16095
+ if (!nodeEntry) {
16096
+ const [mergetagNodeEntry] = Editor.nodes(editor, {
16097
+ match: (node) => {
16098
+ return NodeUtils.isMergetagElement(node);
16099
+ },
16100
+ mode: "lowest"
16101
+ });
16102
+ nodeEntry = mergetagNodeEntry;
16103
+ }
16095
16104
  const textNode = nodeEntry == null ? void 0 : nodeEntry[0];
16096
16105
  useEffect(() => {
16097
16106
  let fontSizeValue2 = textNode == null ? void 0 : textNode.fontSize;
@@ -16175,12 +16184,21 @@ const FontFamily$2 = () => {
16175
16184
  const editor = useSlate();
16176
16185
  const { setFieldValue } = useEditorContext();
16177
16186
  const [fontFamilyValue, setFontFamilyValue] = useState();
16178
- const [nodeEntry] = Editor.nodes(editor, {
16187
+ let [nodeEntry] = Editor.nodes(editor, {
16179
16188
  match: (node) => {
16180
16189
  return Text$2.isText(node);
16181
16190
  },
16182
16191
  mode: "lowest"
16183
16192
  });
16193
+ if (!nodeEntry) {
16194
+ const [mergetagNodeEntry] = Editor.nodes(editor, {
16195
+ match: (node) => {
16196
+ return NodeUtils.isMergetagElement(node);
16197
+ },
16198
+ mode: "lowest"
16199
+ });
16200
+ nodeEntry = mergetagNodeEntry;
16201
+ }
16184
16202
  const textNode = nodeEntry == null ? void 0 : nodeEntry[0];
16185
16203
  useEffect(() => {
16186
16204
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.51.3",
3
+ "version": "1.51.4",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"