Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/core/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export interface coreContext extends Pick<Dispatch<object, EventMap>, 'on'> {
graph(): coreGraph;
pauseChangeDispatch(): void;
resumeChangeDispatch(): void;
perform: any;
perform: coreHistory['perform'];
replace: coreHistory['replace'];
pop: coreHistory['pop'];
undo: coreHistory['undo'];
Expand Down Expand Up @@ -692,10 +692,10 @@ export function coreContext(this: object): coreContext {
// of instantiation shouldn't matter.
function instantiateInternal() {

_history = coreHistory(context);
context.graph = _history.graph;
context.pauseChangeDispatch = _history.pauseChangeDispatch;
context.resumeChangeDispatch = _history.resumeChangeDispatch;
_history = new coreHistory(context);
context.graph = () => _history.graph();
context.pauseChangeDispatch = () => _history.pauseChangeDispatch();
context.resumeChangeDispatch = () => _history.resumeChangeDispatch();
context.perform = withDebouncedSave(_history.perform);
context.replace = withDebouncedSave(_history.replace);
context.pop = withDebouncedSave(_history.pop);
Expand Down
2 changes: 1 addition & 1 deletion modules/core/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export class coreGraph {
}

// Obliterates any existing entities
load(entities: { [key: EntityId | number]: iD.OsmEntity }) {
load(entities: { [key: EntityId | number]: iD.OsmEntity | undefined }) {
var base = this.base();
this.entities = Object.create(base.entities);

Expand Down
Loading
Loading