Skip to content

Node.js based forum software built for the modern web

fix: getCategoryById to return shallow clone of object

Julian Lamdc35bf8bb528
diff --git a/src/categories/index.js b/src/categories/index.js
index 54346d5a64..5e5efd921a 100644
--- a/src/categories/index.js
+++ b/src/categories/index.js
@@ -64,7 +64,7 @@ Categories.getCategoryById = async function (data) {
category: category,
...data,
});
- return result.category;
+ return { ...result.category };
};
Categories.getAllCidsFromSet = async function (key) {