Skip to content

Commit

Permalink
Merge pull request #5566 from kiva/fix-autolending-dev-mode-lbc-null
Browse files Browse the repository at this point in the history
fix: autolending dev mode lbc null
  • Loading branch information
mcstover authored Oct 1, 2024
2 parents 1bf66ef + f02626d commit c2fe667
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
12 changes: 11 additions & 1 deletion src/components/Kv/KvRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ export default {
isChecked() {
return this.radioValue === this.modelValue;
}
}
},
watch: {
modelValue: {
immediate: true,
handler(value) {
if (value !== this.inputValue) {
this.inputValue = value;
}
}
},
},
};
</script>
Expand Down
8 changes: 0 additions & 8 deletions src/pages/Autolending/AutolendingStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,6 @@ export default {
mounted() {
// After initial value is loaded, setup watch
this.$watch('autolendingStatus', this.watchAutolendingStatus);
this.$watch('showLightbox', next => {
if (next) {
this.autolendingStatus = this.setAutolendingStatus({
isEnabled: this.isEnabled,
pauseUntil: this.pauseUntil
});
}
});
},
methods: {
watchAutolendingStatus() {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/LoanFinding/LoanFinding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export default {
const cachedRecommendedLoans = this.apollo.readQuery({
query: flssLoansQueryExtended,
variables: prefetchedRecommendedLoansVariables
})?.fundraisingLoans?.values ?? [];
})?.fundraisingLoans?.values?.filter(loan => loan !== null) ?? [];
this.initializeFiveDollarsNotes();
Expand Down
2 changes: 1 addition & 1 deletion src/util/loanSearch/dataUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function runLoansQuery(apollo, loanSearchState, origin) {
origin,
);

return { loans: flssData?.values ?? [], totalCount: flssData?.totalCount ?? 0 };
return { loans: flssData?.values?.filter(loan => loan !== null) ?? [], totalCount: flssData?.totalCount ?? 0 };
}

/**
Expand Down
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default defineConfig({
'**/*.bin',
'**/*.wasm',
],
// Force all assets/vite calls through /static in dev mode, compiled mode is covered by the build config below
base: isProd ? '/' : '/static/',
// Use /static for all assets in prod mode
build: {
assetsDir: 'static',
assetsInlineLimit: (filePath, content) => {
Expand Down

0 comments on commit c2fe667

Please sign in to comment.