Skip to content

Commit

Permalink
CORE: fix provider id type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ekachxaidze98 committed Jan 27, 2025
1 parent 90c4ef7 commit 357e475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/data-provider/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DataProviderTemplate = ({ data, onSearch, className, ...restProps }) => {
return universityName ?? ''
}

const checkProvider = checkDataProvider(`${data.id}`)
const checkProvider = checkDataProvider(data.id)

const truncate = (str, maxLength) => {
if (str.length <= maxLength) return str
Expand Down
6 changes: 3 additions & 3 deletions utils/data-providers-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ function checkMembership(dataProviderId) {
return cachedMembers.find((item) => {
if (Array.isArray(item.repo_id)) {
return (
item.repo_id.includes(dataProviderId.toString()) &&
item.billingType !== 'starting'
item.repo_id.includes(dataProviderId) && item.billingType !== 'starting'
)
}

return +item.repo_id === +dataProviderId && item.billingType !== 'starting'
})
}

function checkDataProvider(dataProviderId) {
return cachedMembers.find((item) => {
if (Array.isArray(item.repo_id))
return item.repo_id.includes(dataProviderId.toString())
return item.repo_id.includes(dataProviderId)
return +item.repo_id === +dataProviderId
})
}
Expand Down

0 comments on commit 357e475

Please sign in to comment.