Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 755f336

Browse files
authored
fix(build): reject issue (#1201)
* fix(build): reject issue * fix(build): reject issue * fix(build): reject issue * fix(build): ramda ts error * fix(build): ramda ts error * fix(build): ramda ts error * fix(build): old data model
1 parent e46b3f7 commit 755f336

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

src/containers/editor/WorksEditor/store.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ const WorksEditor = T.model('WorksEditor', {
170170
const socialInfo = toJS(self.socialInfo)
171171
const selectedPlatforms = socialInfo.map((s) => s.platform)
172172

173+
// @ts-ignore
173174
return reject((o) => includes(o.value, selectedPlatforms), SOCIAL_OPTIONS)
174175
},
175176

@@ -284,11 +285,9 @@ const WorksEditor = T.model('WorksEditor', {
284285
self.teammates = [user].concat(toJS(self.teammates))
285286
},
286287
removeTeammates(user: TUser): void {
288+
const teammates = toJS(self.teammates)
287289
// @ts-ignore
288-
self.teammates = reject(
289-
(t) => t.login === user.login,
290-
toJS(self.teammates),
291-
)
290+
self.teammates = reject((t) => t.login === user.login, teammates)
292291
},
293292
getSocialPrefix(platform: string): string {
294293
switch (platform) {
@@ -312,6 +311,7 @@ const WorksEditor = T.model('WorksEditor', {
312311

313312
// @ts-ignore
314313
return reject(
314+
// @ts-ignore
315315
(s) => s.link.trim() === getSocialPrefix(s.platform),
316316
socialInfo,
317317
)

src/containers/tool/CommunityTagSetter/store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const CommunityTagSetter = T.model('CommunityTagSetter', {
7777
searchedCommunities: reject(
7878
(c) =>
7979
includes(
80+
// @ts-ignore
8081
c.raw,
8182
map((s) => s.raw, selectedCommunities),
8283
),
@@ -86,6 +87,7 @@ const CommunityTagSetter = T.model('CommunityTagSetter', {
8687
commonUsedCommunities: reject(
8788
(c) =>
8889
includes(
90+
// @ts-ignore
8991
c.raw,
9092
map((s) => s.raw, selectedCommunities),
9193
),

src/containers/user/UserProfile/store.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const UserProfile = T.model('UserProfile', {
4141
const { entries, ...rest } = subscribedCommunitiesData
4242

4343
return {
44+
// @ts-ignore
4445
entries: reject((c) => c.raw === HCN, entries),
4546
...rest,
4647
}

src/stores/Model/helper/article.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export const articleFields = () => {
3636
digest: T.maybeNull(T.string),
3737
author: T.maybeNull(User),
3838

39-
meta: T.optional(ArticleMeta, {}),
39+
// meta: T.optional(ArticleMeta, {}),
40+
meta: T.maybeNull(ArticleMeta),
4041

4142
linkAddr: T.maybeNull(T.string),
4243
copyRight: T.maybeNull(T.string),
@@ -65,7 +66,8 @@ export const articleFields = () => {
6566

6667
insertedAt: T.optional(T.string, ''),
6768
updatedAt: T.optional(T.string, ''),
68-
activeAt: T.optional(T.string, ''),
69+
// activeAt: T.optional(T.string, ''),
70+
activeAt: T.maybeNull(T.string),
6971

7072
isArchived: T.optional(T.boolean, false),
7173
archivedAt: T.maybeNull(T.string),

src/widgets/EmotionSelector/helper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const emotionsCoverter = (selectedEmotions: TEmotion): TEmotion[] => {
2121
}),
2222
)
2323

24+
// @ts-ignore
2425
return reject((e) => includes(0, values(e)), converted)
2526
}
2627

0 commit comments

Comments
 (0)