@flozy/editor 4.1.0 → 4.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,11 +25,13 @@ const EmbedScriptPopup = props => {
25
25
  error
26
26
  } = apiStatus;
27
27
  useEffect(() => {
28
- customProps.services("allowedDomains", {}).then(data => {
29
- setAllowedDomains(data?.data || []);
30
- }).catch(err => {
31
- console.log(err);
32
- });
28
+ if (customProps?.services) {
29
+ customProps.services("allowedDomains", {}).then(data => {
30
+ setAllowedDomains(data?.data || []);
31
+ }).catch(err => {
32
+ console.log(err);
33
+ });
34
+ }
33
35
  }, []);
34
36
  const updateApiStatus = update => {
35
37
  setApiStatus(prev => ({
@@ -44,7 +46,7 @@ const EmbedScriptPopup = props => {
44
46
  updateApiStatus({
45
47
  loading: true
46
48
  });
47
- const result = await customProps.services("validateCode", {
49
+ const result = await customProps?.services("validateCode", {
48
50
  code
49
51
  });
50
52
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"