diff --git a/src/components/Common/ErrorWrapper.jsx b/src/components/Common/ErrorWrapper.jsx
index f52135b8..a894addd 100644
--- a/src/components/Common/ErrorWrapper.jsx
+++ b/src/components/Common/ErrorWrapper.jsx
@@ -1,12 +1,11 @@
import React from "react";
import classnames from "classnames";
+import { isNotPresent } from "neetocist";
import { is } from "ramda";
-import { isNilOrEmpty } from "utils/common";
-
const ErrorWrapper = ({ error, children, className }) => {
- const isError = !isNilOrEmpty(error);
+ const isError = !isNotPresent(error);
const wrapperClasses = classnames({
"neeto-editor-error": isError,
[className]: className,
@@ -25,7 +24,7 @@ const ErrorWrapper = ({ error, children, className }) => {
message = error.message;
}
- if (isNilOrEmpty(message)) return null;
+ if (isNotPresent(message)) return null;
return message;
};
diff --git a/src/components/Editor/CustomExtensions/SlashCommands/Menu.jsx b/src/components/Editor/CustomExtensions/SlashCommands/Menu.jsx
index 873be60e..9c71f44b 100644
--- a/src/components/Editor/CustomExtensions/SlashCommands/Menu.jsx
+++ b/src/components/Editor/CustomExtensions/SlashCommands/Menu.jsx
@@ -2,8 +2,8 @@ import React, { forwardRef } from "react";
import Tippy from "@tippyjs/react";
import classnames from "classnames";
+import { isNotPresent } from "neetocist";
-import { isNilOrEmpty } from "utils/common";
import { scrollHandler } from "utils/scrollhandler";
class Menu extends React.Component {
@@ -57,7 +57,7 @@ class Menu extends React.Component {
const { items, editor, range } = this.props;
const selectedItem = items[index];
const hasCommand = selectedItem && selectedItem.command;
- const isLeafNode = isNilOrEmpty(selectedItem.items);
+ const isLeafNode = isNotPresent(selectedItem.items);
if (hasCommand && isLeafNode) selectedItem.command({ editor, range });
};
@@ -89,7 +89,7 @@ class Menu extends React.Component {
const { menuIndex, setActiveMenuIndex, items } = this.props;
const { selectedIndex } = this.state;
const selectedItem = items[selectedIndex];
- const hasSubItems = selectedItem && !isNilOrEmpty(selectedItem.items);
+ const hasSubItems = selectedItem && !isNotPresent(selectedItem.items);
if (hasSubItems) setActiveMenuIndex(menuIndex + 1);
};
@@ -101,7 +101,7 @@ class Menu extends React.Component {
return (
{items.map((item, index) => {
- const isLeafNode = isNilOrEmpty(item.items);
+ const isLeafNode = isNotPresent(item.items);
const nodeElement = (