Skip to content

Commit

Permalink
fix #1875 - mergeProps not handling undefined on SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Sep 11, 2023
1 parent f79ba4d commit 12eb155
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-donuts-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solid-js": patch
---

fix #1875 - mergeProps not handling undefined on SSR
5 changes: 3 additions & 2 deletions packages/solid/src/server/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ export function mergeProps(...sources: any): any {
enumerable: true,
get() {
for (let i = sources.length - 1; i >= 0; i--) {
let s = sources[i] || {};
let v,
s = sources[i];
if (typeof s === "function") s = s();
const v = s[key];
v = (s || {})[key];
if (v !== undefined) return v;
}
}
Expand Down

0 comments on commit 12eb155

Please sign in to comment.