Unverified Commit 46101d45 authored by gaoyan's avatar gaoyan Committed by GitHub

[optimize]optimize task diff model (#3112)

parent 26b10ca7
...@@ -76,7 +76,13 @@ const StudioEditor: React.FC<EditorProps & connect> = (props) => { ...@@ -76,7 +76,13 @@ const StudioEditor: React.FC<EditorProps & connect> = (props) => {
Object.keys(serverParams).forEach((key) => { Object.keys(serverParams).forEach((key) => {
if (TASK_VAR_FILTER.includes(key)) { if (TASK_VAR_FILTER.includes(key)) {
cache[key] = serverParams[key]; cache[key] = serverParams[key];
} else if (JSON.stringify(serverParams[key]) !== JSON.stringify(cache[key])) { } else if (key == 'configJson') {
const cacheCj = JSON.stringify(cache[key]);
const serverCj = JSON.stringify(serverParams[key]);
if (cacheCj != serverCj) {
diff.push({ key: key, server: serverCj, cache: cacheCj });
}
} else if (serverParams[key] != cache[key]) {
diff.push({ key: key, server: serverParams[key], cache: cache[key] }); diff.push({ key: key, server: serverParams[key], cache: cache[key] });
} }
}); });
......
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