fix sleeve memory bug

This commit is contained in:
Olivier Gagnon
2021-09-08 23:47:34 -04:00
parent bada8a5f39
commit 2a13db39c7
360 changed files with 5424 additions and 15764 deletions
+2 -6
View File
@@ -18,15 +18,11 @@ export const Locations: IMap<Location> = {};
*/
function constructLocation(p: IConstructorParams): Location {
if (!p.name) {
throw new Error(
`Invalid constructor parameters for Location. No 'name' property`,
);
throw new Error(`Invalid constructor parameters for Location. No 'name' property`);
}
if (Locations[p.name] instanceof Location) {
console.warn(
`Property with name ${p.name} already exists and is being overwritten`,
);
console.warn(`Property with name ${p.name} already exists and is being overwritten`);
}
Locations[p.name] = new Location(p);