File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export async function load({ fetch }) {
2626 // Sort deals into their respective projects
2727 hubspotData . pipelineDeals . forEach ( ( deal ) => {
2828 content . props . projects . forEach ( ( project ) => {
29- if ( deal . properties . dealname . toLowerCase ( ) . includes ( project . slug . toLowerCase ( ) ) ) {
29+ // Replace hyphens with spaces for comparison
30+ const projectNameForComparison = project . slug . toLowerCase ( ) . replace ( / - / g, ' ' ) ;
31+ if ( deal . properties . dealname . toLowerCase ( ) . includes ( projectNameForComparison ) ) {
3032 projectDonations [ project . slug ] . deals . push ( deal ) ;
3133 projectDonations [ project . slug ] . total +=
3234 parseFloat ( deal . properties . amount ) || 0 ;
Original file line number Diff line number Diff line change @@ -38,9 +38,11 @@ export async function load({ params, fetch }) {
3838
3939 // Get deals for this project
4040 hubspotData . pipelineDeals . forEach ( ( deal ) => {
41+ // Replace hyphens with spaces for comparison
42+ const projectNameForComparison = project . slug . toLowerCase ( ) . replace ( / - / g, ' ' ) ;
4143 if (
4244 deal . properties . dealname . toLowerCase ( ) . includes (
43- project . slug . toLowerCase ( ) ,
45+ projectNameForComparison
4446 )
4547 ) {
4648 projectDonations . deals . push ( deal ) ;
Original file line number Diff line number Diff line change 231231 "totalDonations" : 150 ,
232232 "totalMonthlyDonations" : 0 ,
233233 "totalOneTimeDonations" : 150 ,
234- "lastUpdated" : " 2025-04-14T18:44:08.650Z "
234+ "lastUpdated" : " 2025-04-14T19:08:43.304Z "
235235}
You can’t perform that action at this time.
0 commit comments