@storybook/source-loader
Advanced tools
Comparing version
@@ -173,3 +173,4 @@ "use strict"; | ||
const newParameters = `${propertyDeclaration}${additionalParametersAsJson},${parametersSliceOfCode.substring(1)}${comma}`; | ||
const result = splicedSource.substring(0, indexWhereToAppend) + newParameters + splicedSource.substring(indexWhereToAppend); | ||
const additionalComma = comma === ',' ? '' : ','; | ||
const result = `${splicedSource.substring(0, indexWhereToAppend)}${newParameters}${additionalComma}${splicedSource.substring(indexWhereToAppend)}`; | ||
return result; | ||
@@ -176,0 +177,0 @@ } |
@@ -152,2 +152,9 @@ "use strict"; | ||
foundParametersProperty = !!parametersProperty; | ||
if (foundParametersProperty) { | ||
(0, _parseHelpers.patchNode)(parametersProperty.value); | ||
} else { | ||
(0, _parseHelpers.patchNode)(node.declaration); | ||
} | ||
splicedSource = parametersProperty ? source.substring(0, parametersProperty.value.start) + source.substring(parametersProperty.value.end + 1) : splicedSource; | ||
@@ -154,0 +161,0 @@ parametersSliceOfCode = parametersProperty ? source.substring(parametersProperty.value.start, parametersProperty.value.end) : '{}'; |
{ | ||
"name": "@storybook/source-loader", | ||
"version": "5.2.4", | ||
"version": "5.2.5", | ||
"description": "Source loader", | ||
@@ -31,4 +31,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@storybook/addons": "5.2.4", | ||
"@storybook/router": "5.2.4", | ||
"@storybook/addons": "5.2.5", | ||
"@storybook/router": "5.2.5", | ||
"core-js": "^3.0.1", | ||
@@ -45,3 +45,3 @@ "estraverse": "^4.2.0", | ||
}, | ||
"gitHead": "847110e3bbe21892c7d27d01f5d4d2f386e03e21" | ||
"gitHead": "6e80db697f865f833cf3e250573a7ce36e0ee02a" | ||
} |
38110
0.71%884
0.68%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated