Skip to content

Commit b40d61b

Browse files
authored
Merge pull request #565 from gitanupam/patch-1
Fixing the 'Edit this page' link
2 parents b63a2c1 + 524ce29 commit b40d61b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/page/page.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import Sidecar from '../sidecar/sidecar';
66
import Contributors from '../contributors/contributors';
77
import './page-style';
88
import '../sidebar/sidebar-style';
9+
import { trimEnd } from 'lodash';
910

1011
export default ({ section, page }) => {
11-
let edit = `https://github.com/webpack/webpack.js.org/edit/develop/content/${page.url}.md`;
12+
let edit = `https://github.com/webpack/webpack.js.org/edit/develop/content/${trimEnd(page.url, '/')}.md`;
1213

1314
return (
1415
<Container className="page">

0 commit comments

Comments
 (0)