Skip to content

Commit

Permalink
fix: svelte mitosis_styling fn (BuilderIO#752)
Browse files Browse the repository at this point in the history
* fix svelte mitosis_styling fn

* release
  • Loading branch information
samijaber authored Sep 23, 2022
1 parent 2ec674a commit d735e6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder.io/mitosis-cli",
"version": "0.0.23",
"version": "0.0.24",
"description": "mitosis CLI",
"types": "build/types/types.d.ts",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"engines": {
"npm": "99999999.9.9"
},
"version": "0.0.62",
"version": "0.0.63",
"homepage": "https://github.com/BuilderIO/mitosis",
"main": "./dist/src/index.js",
"exports": {
Expand Down
16 changes: 8 additions & 8 deletions packages/core/src/__tests__/__snapshots__/svelte.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ exports[`Svelte Javascript Test Img 1`] = `
export let altText;
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down Expand Up @@ -1074,7 +1074,7 @@ exports[`Svelte Javascript Test Section 1`] = `
export let maxWidth;
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand All @@ -1098,7 +1098,7 @@ exports[`Svelte Javascript Test Section 2`] = `
export let attributes;
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down Expand Up @@ -1307,7 +1307,7 @@ exports[`Svelte Javascript Test Video 1`] = `
export let loop;
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down Expand Up @@ -3024,7 +3024,7 @@ exports[`Svelte Typescript Test Img 1`] = `
export let altText: ImgProps[\\"altText\\"];
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down Expand Up @@ -3114,7 +3114,7 @@ exports[`Svelte Typescript Test Section 1`] = `
export let maxWidth: SectionProps[\\"maxWidth\\"];
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down Expand Up @@ -3146,7 +3146,7 @@ exports[`Svelte Typescript Test Section 2`] = `
export let attributes: SectionProps[\\"attributes\\"];
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down Expand Up @@ -3430,7 +3430,7 @@ exports[`Svelte Typescript Test Video 1`] = `
export let loop: VideoProps[\\"loop\\"];
function mitosis_styling(node, vars) {
Object.entries(vars).forEach(([p, v]) => {
Object.entries(vars || {}).forEach(([p, v]) => {
node.style[p] = v;
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/generators/svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ export const componentToSvelte: TranspilerGenerator<ToSvelteOptions> =
hasStyle(json)
? `
function mitosis_styling (node, vars) {
Object.entries(vars).forEach(([ p, v ]) => { node.style[p] = v })
Object.entries(vars || {}).forEach(([ p, v ]) => { node.style[p] = v })
}
`
: ''
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder.io/eslint-plugin-mitosis",
"version": "0.0.7",
"version": "0.0.8",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"license": "MIT",
Expand Down

0 comments on commit d735e6d

Please sign in to comment.