diff --git a/packages/ogre/src/repository.ts b/packages/ogre/src/repository.ts index 1de5cd1..30c059e 100644 --- a/packages/ogre/src/repository.ts +++ b/packages/ogre/src/repository.ts @@ -21,7 +21,7 @@ import { createHeadRefValue, getLastRefPathElement, headValueRefPrefix, - immutableRefCopy, + immutableMapCopy, localHeadPathPrefix, mapPath, mutableMapCopy, @@ -109,7 +109,7 @@ export class Repository constructor(obj: Partial, options: RepositoryOptions) { // FIXME: move this to refs/remote as git would do? - this.remoteRefs = immutableRefCopy(options.history?.refs); + this.remoteRefs = immutableMapCopy(options.history?.refs); this.original = deepClone(obj); // store js ref, so obj can still be modified without going through repo.data this.data = obj as T; diff --git a/packages/ogre/src/utils.ts b/packages/ogre/src/utils.ts index 6be4067..b33714f 100644 --- a/packages/ogre/src/utils.ts +++ b/packages/ogre/src/utils.ts @@ -218,7 +218,7 @@ export const printChange = (chg: Operation) => { export const getLastRefPathElement = (thePath: string) => thePath.substring(thePath.lastIndexOf("/") + 1); -export const immutableRefCopy = ( +export const immutableMapCopy = ( map: Map | undefined, ) => { if (!map) {