Skip to content

Commit 3fba794

Browse files
Merge pull request #98 from natesilva/fix-through-typo
fix typo though → through
2 parents 93f5c24 + 51b7943 commit 3fba794

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/models/BaseSequelize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {ISequelizeAssociation} from "../interfaces/ISequelizeAssociation";
1717
*/
1818
export abstract class BaseSequelize {
1919

20-
thoughMap: { [through: string]: any } = {};
20+
throughMap: { [through: string]: any } = {};
2121
_: { [modelName: string]: (typeof Model) } = {};
2222

2323
static extend(target: any): void {

lib/models/v3/Sequelize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class Sequelize extends SequelizeOrigin implements BaseSequelize {
1515
// to fix "$1" called with something that's not an instance of Sequelize.Model
1616
Model: any = Function;
1717

18-
thoughMap: { [through: string]: any } = {};
18+
throughMap: { [through: string]: any } = {};
1919
_: { [modelName: string]: typeof Model } = {};
2020
init: (config: ISequelizeConfig) => void;
2121
addModels: (models: Array<typeof Model> | string[]) => void;

lib/models/v4/Sequelize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let preparedConfig;
1111

1212
export class Sequelize extends OriginSequelize implements BaseSequelize {
1313

14-
thoughMap: {[through: string]: any} = {};
14+
throughMap: {[through: string]: any} = {};
1515
_: {[modelName: string]: typeof Model} = {};
1616
init: (config: ISequelizeConfig) => void;
1717
addModels: (models: Array<typeof Model>|string[]) => void;

lib/services/association.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ export function processAssociation(sequelize: BaseSequelize,
227227
export function getThroughClass(sequelize: BaseSequelize,
228228
association: ISequelizeAssociation): any {
229229
if (association.through) {
230-
if (!sequelize.thoughMap[association.through]) {
230+
if (!sequelize.throughMap[association.through]) {
231231
const throughModel = sequelize.getThroughModel(association.through);
232232
sequelize.addModels([throughModel]);
233-
sequelize.thoughMap[association.through] = throughModel;
233+
sequelize.throughMap[association.through] = throughModel;
234234
}
235-
return sequelize.thoughMap[association.through];
235+
return sequelize.throughMap[association.through];
236236
}
237237
return (association.throughClassGetter as () => typeof Model)();
238238
}

0 commit comments

Comments
 (0)