MCPcopy Create free account
hub / github.com/facebook/Rapid / processResolvedConflicts

Method processResolvedConflicts

modules/core/UploaderSystem.js:451–468  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

449
450
451 processResolvedConflicts() {
452 const editor = this.context.systems.editor;
453
454 for (const conflict of this._conflicts) {
455 if (conflict.chosen === 1) { // user chose "use theirs"
456 const graph = editor.staging.graph;
457 const entity = graph.hasEntity(conflict.id);
458 if (entity?.type === 'way') {
459 for (const child of utilArrayUniq(entity.nodes)) {
460 editor.perform(actionRevert(child));
461 }
462 }
463 editor.perform(actionRevert(conflict.id));
464 }
465 }
466
467 this.save(true, false); // tryAgain = true, checkConflicts = false
468 }
469}

Callers 1

_resultConflictsMethod · 0.80

Calls 4

saveMethod · 0.95
actionRevertFunction · 0.90
hasEntityMethod · 0.80
performMethod · 0.80

Tested by

no test coverage detected