Skip to content

Commit 8311f34

Browse files
Maledongfhemberger
authored andcommitted
chore: update functions to ES6 in 'navigation.js' (#2198)
In 'navigation.js', there're some functions in the old style, union them by re-writing them into ES6.
1 parent 54db2f3 commit 8311f34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/plugins/navigation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Extracts the main menu and sub-menu links form locale's site.json and
44
// adds them to the metadata. This data is used in the navigation template
55
module.exports = function buildNavigation (latestVersions) {
6-
return function (files, metalsmith, done) {
6+
return (files, metalsmith, done) => {
77
const meta = metalsmith.metadata()
88
meta.nav = {}
99
generateNavigation(meta.site, 'main')
@@ -14,7 +14,7 @@ module.exports = function buildNavigation (latestVersions) {
1414
if (obj.link && obj.text) {
1515
parent.push(obj)
1616
}
17-
Object.keys(obj).forEach(function (key) {
17+
Object.keys(obj).forEach((key) => {
1818
if (obj[key].link && obj[key].text) {
1919
// Insert latest versions for API docs
2020
if (key === 'api-current') {

0 commit comments

Comments
 (0)