Skip to content

Commit 948de13

Browse files
committed
Compare both model service path and user service path using the shortName format.
This addresses an issue where models defined with a service path containing a leading slash('/') won't cause a mismatch between the userService path. Defining a leading slash in the userService path will cause an issue during the idField fetch on setup. This should be the easiest possible solution without much risk of any unexpected mismatches.
1 parent cd8b015 commit 948de13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auth-module/auth-module.actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function makeAuthActions(feathersClient) {
3939
if (state.serverAlias && state.userService) {
4040
const Model = Object.keys(models[state.serverAlias])
4141
.map(modelName => models[state.serverAlias][modelName])
42-
.find(model => model.servicePath === getShortName(state.userService))
42+
.find(model => getShortName(model.servicePath) === getShortName(state.userService))
4343
if (Model) {
4444
user = new Model(user)
4545
}

0 commit comments

Comments
 (0)