[Sync] Skip state check hook on first load (#87)

This commit is contained in:
Chenlei Hu
2024-07-04 09:44:55 -04:00
committed by GitHub
parent 218b0aa937
commit c4b6c9f63e

View File

@@ -190,9 +190,11 @@ export class ChangeTracker {
const onNodeAdded = LiteGraph.LGraph.prototype.onNodeAdded;
LiteGraph.LGraph.prototype.onNodeAdded = function () {
const v = onNodeAdded?.apply(this, arguments);
const ct = changeTracker();
if (!ct.isOurLoad) {
ct.checkState();
if (!app?.configuringGraph) {
const ct = changeTracker();
if (!ct.isOurLoad) {
ct.checkState();
}
}
return v;
};