Skip to content

Commit 4bea9ce

Browse files
chore: wip
1 parent 6b6d6c5 commit 4bea9ce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/Models/User.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export default {
110110
},
111111

112112
get: {
113-
fullName: (user: UserModel) => capitalize(user.name || ''),
113+
fullName: (user: UserModel) => {
114+
return user.name ? capitalize(user.name) : ''
115+
},
114116
},
115117

116118
set: {

storage/framework/core/types/src/model.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export interface ModelOptions extends Base {
147147
relationName?: string
148148
}[]
149149

150+
scopes?: {
151+
[key: string]: (value: any) => any
152+
}
153+
150154
get?: {
151155
[key: string]: (value: any) => any
152156
}

0 commit comments

Comments
 (0)