瀏覽代碼

console.log -> debug

visuddhinanda 2 年之前
父節點
當前提交
4aed9f776b
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      dashboard/src/components/anthology/EditableTocTree.tsx

+ 3 - 1
dashboard/src/components/anthology/EditableTocTree.tsx

@@ -42,11 +42,13 @@ const EditableTocTreeWidget = ({
   const [viewArticleId, setViewArticleId] = useState<string>();
   const [viewArticleId, setViewArticleId] = useState<string>();
 
 
   const save = (data?: ListNodeData[]) => {
   const save = (data?: ListNodeData[]) => {
-    console.log("onSave", data);
+    console.debug("onSave", data);
     if (typeof data === "undefined") {
     if (typeof data === "undefined") {
+      console.warn("data === undefined");
       return;
       return;
     }
     }
     const url = `/v2/article-map/${anthologyId}`;
     const url = `/v2/article-map/${anthologyId}`;
+    console.info("url", url);
     const newData: IArticleMapRequest[] = data.map((item) => {
     const newData: IArticleMapRequest[] = data.map((item) => {
       let title = "";
       let title = "";
       if (typeof item.title === "string") {
       if (typeof item.title === "string") {