Skip to content

Commit

Permalink
Merge pull request #29 from Links17/main
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
Links17 authored Jan 15, 2025
2 parents ca7fd13 + 7d5497a commit 088a2cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ async function iinstallModeList(info) {
if (info !== "") {
let newModules = JSON.parse(info);
let installList = []
if (info.length > 0) {
if (newModules?.libs?.length > 0) {
const oldModules = await getNodeList()
// 创建一个映射,用于存储旧模块的版本信息
const oldVersionMap = new Map(oldModules.map(m => [m.module, m.version]));
// 迭代新模块以找出新增或版本不同的模块
newModules = newModules.libs
const updates = newModules.filter(m => {
const isNewOrUpdated = !oldVersionMap.has(m.module) || oldVersionMap.get(m.module) !== m.version;
if (oldVersionMap.get(m.module) !== m.version && !update_flag) {
Expand Down

0 comments on commit 088a2cc

Please sign in to comment.