Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix(store): normalize pattern ids across platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
faselbaum committed Mar 8, 2018
1 parent cc1d2af commit 22dccdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/styleguide/typescript-react-analyzer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ function generatePatternId(
const relativeDirectoryPath = PathUtils.relative(basePath, fileInfo.directory);

const baseIdentifier = PathUtils.join(relativeDirectoryPath, baseName);
const baseIdentifierNormalized = baseIdentifier.split(PathUtils.sep).join('/');
const exportIdentifier = exportInfo.name ? `@${exportInfo.name}` : '';

const id = `${baseIdentifier}${exportIdentifier}`;
const id = `${baseIdentifierNormalized}${exportIdentifier}`;

return id;
}

0 comments on commit 22dccdd

Please sign in to comment.