easy-email-pro-theme 1.50.15 → 1.50.16

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 +9 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -35702,12 +35702,17 @@ function AIAssistant({ isCollapsed }) {
35702
35702
  const [errorMsg, setErrorMsg] = useState("");
35703
35703
  const [prompt, setPrompt] = useState([]);
35704
35704
  const [selectedText, setSelectedText] = useState("");
35705
+ let blockText = "";
35706
+ try {
35707
+ blockText = !isCollapsed && editor.selection && Editor.string(editor, editor.selection) ? Editor.string(editor, editor.selection) : Editor.string(editor, selectedNodePath);
35708
+ } catch (error2) {
35709
+ console.log("error", error2);
35710
+ }
35705
35711
  useEffect(() => {
35706
- const text = !isCollapsed && editor.selection && Editor.string(editor, editor.selection) ? Editor.string(editor, editor.selection) : Editor.string(editor, selectedNodePath);
35707
- if (text) {
35708
- setSelectedText(text);
35712
+ if (blockText) {
35713
+ setSelectedText(blockText);
35709
35714
  }
35710
- }, [editor, isCollapsed, selectedNodePath]);
35715
+ }, [blockText]);
35711
35716
  useEffect(() => {
35712
35717
  if (AIAssistantProps == null ? void 0 : AIAssistantProps.options) {
35713
35718
  setOptions(AIAssistantProps == null ? void 0 : AIAssistantProps.options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.50.15",
3
+ "version": "1.50.16",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"