Commit 85b10715 authored by 姜登's avatar 姜登

gjj

parent 8898be3b
Pipeline #14052 passed with stage
in 11 seconds
...@@ -138,13 +138,13 @@ class ScriptController extends Controller { ...@@ -138,13 +138,13 @@ class ScriptController extends Controller {
} }
const data = await service.scripts.fetchHubSeripts(hubId); const data = await service.scripts.fetchHubSeripts(hubId);
const array = []; const array = [];
data.forEach(element => { for (const element of data) {
if (element.state === 'online') { if (element.state === 'online') {
array.unshift(element); array.unshift(element);
} else if (element.state !== 'none') { } else if (element.state !== 'none') {
array.push(element); array.push(element);
} }
}); }
ctx.success(array); ctx.success(array);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment