fix: Trim trailing digits from minimized classnames

This commit is contained in:
Tom Moor
2023-02-17 19:04:50 -05:00
parent 2cd5d0e624
commit aece719a07

View File

@@ -57,7 +57,7 @@ export default abstract class BaseStore<T extends BaseModel> {
constructor(rootStore: RootStore, model: Class<T>) {
this.rootStore = rootStore;
this.model = model;
this.modelName = lowerFirst(model.name);
this.modelName = lowerFirst(model.name).replace(/\d$/, "");
if (!this.apiEndpoint) {
this.apiEndpoint = `${this.modelName}s`;