Skip to content

Commit

Permalink
Merge pull request #304 from AJIXuMuK/field-name-preview
Browse files Browse the repository at this point in the history
Fix of #296
  • Loading branch information
estruyf committed May 20, 2019
2 parents 09e6b0d + cc37331 commit 7140b53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controls/fields/fieldNameRenderer/FieldNameRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ export class FieldNameRenderer extends React.Component<IFieldNameRendererProps,
else {
let url: string;
const filePath = this.props.filePath;
const parentPath = filePath.substring(0, filePath.lastIndexOf('/'));
if (this.props.hasPreview !== false) {
url = `#id=${filePath}&parent=${filePath.substring(0, filePath.lastIndexOf('/'))}`;
url = `#id=${encodeURIComponent(filePath)}&parent=${encodeURIComponent(parentPath)}`;
}
else {
url = filePath;
Expand Down

0 comments on commit 7140b53

Please sign in to comment.