Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/containers/editor/WorksEditor/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const WorksEditor = T.model('WorksEditor', {
const socialInfo = toJS(self.socialInfo)
const selectedPlatforms = socialInfo.map((s) => s.platform)

// @ts-ignore
return reject((o) => includes(o.value, selectedPlatforms), SOCIAL_OPTIONS)
},

Expand Down Expand Up @@ -284,11 +285,9 @@ const WorksEditor = T.model('WorksEditor', {
self.teammates = [user].concat(toJS(self.teammates))
},
removeTeammates(user: TUser): void {
const teammates = toJS(self.teammates)
// @ts-ignore
self.teammates = reject(
(t) => t.login === user.login,
toJS(self.teammates),
)
self.teammates = reject((t) => t.login === user.login, teammates)
},
getSocialPrefix(platform: string): string {
switch (platform) {
Expand All @@ -312,6 +311,7 @@ const WorksEditor = T.model('WorksEditor', {

// @ts-ignore
return reject(
// @ts-ignore
(s) => s.link.trim() === getSocialPrefix(s.platform),
socialInfo,
)
Expand Down
2 changes: 2 additions & 0 deletions src/containers/tool/CommunityTagSetter/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const CommunityTagSetter = T.model('CommunityTagSetter', {
searchedCommunities: reject(
(c) =>
includes(
// @ts-ignore
c.raw,
map((s) => s.raw, selectedCommunities),
),
Expand All @@ -86,6 +87,7 @@ const CommunityTagSetter = T.model('CommunityTagSetter', {
commonUsedCommunities: reject(
(c) =>
includes(
// @ts-ignore
c.raw,
map((s) => s.raw, selectedCommunities),
),
Expand Down
1 change: 1 addition & 0 deletions src/containers/user/UserProfile/store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const UserProfile = T.model('UserProfile', {
const { entries, ...rest } = subscribedCommunitiesData

return {
// @ts-ignore
entries: reject((c) => c.raw === HCN, entries),
...rest,
}
Expand Down
6 changes: 4 additions & 2 deletions src/stores/Model/helper/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export const articleFields = () => {
digest: T.maybeNull(T.string),
author: T.maybeNull(User),

meta: T.optional(ArticleMeta, {}),
// meta: T.optional(ArticleMeta, {}),
meta: T.maybeNull(ArticleMeta),

linkAddr: T.maybeNull(T.string),
copyRight: T.maybeNull(T.string),
Expand Down Expand Up @@ -65,7 +66,8 @@ export const articleFields = () => {

insertedAt: T.optional(T.string, ''),
updatedAt: T.optional(T.string, ''),
activeAt: T.optional(T.string, ''),
// activeAt: T.optional(T.string, ''),
activeAt: T.maybeNull(T.string),

isArchived: T.optional(T.boolean, false),
archivedAt: T.maybeNull(T.string),
Expand Down
1 change: 1 addition & 0 deletions src/widgets/EmotionSelector/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const emotionsCoverter = (selectedEmotions: TEmotion): TEmotion[] => {
}),
)

// @ts-ignore
return reject((e) => includes(0, values(e)), converted)
}

Expand Down