Skip to content

Commit 49da40b

Browse files
authored
fix: fix merge style func
1 parent c9202a8 commit 49da40b

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/internal/server

1 file changed

+1
-1
lines changed

packages/svelte/src/internal/server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export function add_styles(style_object) {
270270
export function merge_styles(style_attribute, style_directive) {
271271
/** @type {Record<string, string>} */
272272
const style_object = {};
273-
for (const individual_style of style_attribute.split(';')) {
273+
for (const individual_style of (style_attribute ?? '').split(';')) {
274274
const colon_index = individual_style.indexOf(':');
275275
const name = individual_style.slice(0, colon_index).trim();
276276
const value = individual_style.slice(colon_index + 1).trim();

0 commit comments

Comments
 (0)