Skip to content

Commit

Permalink
fix: source stories update
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Feb 24, 2020
1 parent 5de8627 commit 6497d96
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
32 changes: 18 additions & 14 deletions blocks/core/src/Source/Source.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,15 @@ export const controlsValues = () => {
name: 'name',
usage: [
{
end: {
column: 65,
line: 0,
},
start: {
column: 61,
line: 0,
loc: {
end: {
column: 65,
line: 0,
},
start: {
column: 61,
line: 0,
},
},
},
],
Expand All @@ -202,13 +204,15 @@ export const controlsValues = () => {
name: 'age',
usage: [
{
end: {
column: 75,
line: 0,
},
start: {
column: 72,
line: 0,
loc: {
end: {
column: 75,
line: 0,
},
start: {
column: 72,
line: 0,
},
},
},
],
Expand Down
3 changes: 1 addition & 2 deletions blocks/core/src/Source/argument-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
export const getArgumentNames = (args: StoryArguments): string[] => {
return args.reduce((acc: string[], a) => {
if (Array.isArray(a.value)) {
return [...acc, ...getArgumentNames(a.value as StoryArguments)];
return [...acc, ...getArgumentNames(a.value)];
}
return [...acc, a.value];
}, []);
Expand Down Expand Up @@ -62,7 +62,6 @@ export const mergeControlValues = (
): string => {
const locations = getArgumentsUsage(args);
const lines = source.split('\n');

//sort locations in reverse order, so to replace source backwards
locations
.sort((a, b) => {
Expand Down

0 comments on commit 6497d96

Please sign in to comment.