@aicupa/plugin-balance 1.0.3 → 1.0.4

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/package.json +1 -1
  2. package/service.js +1 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicupa/plugin-balance",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Show time balance ratio between temporary and current tasks",
5
5
  "main": "./service",
6
6
  "view": "./view",
package/service.js CHANGED
@@ -103,10 +103,7 @@ module.exports = createPlugin((api) => {
103
103
  const currentNode = findNodeById(tree, currentNodeId);
104
104
  const tempTime = collectDoneTime(tempNode);
105
105
  const currentTime = collectDoneTime(currentNode);
106
- const percent =
107
- currentTime > 0
108
- ? Math.round((tempTime / (currentTime + tempTime)) * 100)
109
- : 0;
106
+ const percent = Math.round((tempTime / (currentTime + tempTime)) * 100);
110
107
 
111
108
  return {
112
109
  ok: true,