From 105de8515c2be37b6ab19ea6d43f813f3af005c6 Mon Sep 17 00:00:00 2001 From: curben Date: Fri, 7 Jun 2019 09:42:16 +0930 Subject: [PATCH] refactor(es6): arrow function --- themes/typing/layout/_partial/archive.ejs | 4 ++-- themes/typing/layout/_partial/post/gallery.ejs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/typing/layout/_partial/archive.ejs b/themes/typing/layout/_partial/archive.ejs index bb322ab..cac9c5f 100644 --- a/themes/typing/layout/_partial/archive.ejs +++ b/themes/typing/layout/_partial/archive.ejs @@ -1,10 +1,10 @@ <% if (pagination === 2) { %> - <% page.posts.each(function(post) { %> + <% page.posts.each((post) => { %> <%- partial('article', {post: post, index: true}) %> <% }) %> <% } else { %> <% let last %> - <% page.posts.each(function(post, i) { %> + <% page.posts.each((post, i) => { %> <% const year = post.date.year() %> <% if (last !== year) { %> <% if (last !== null) { %> diff --git a/themes/typing/layout/_partial/post/gallery.ejs b/themes/typing/layout/_partial/post/gallery.ejs index 8881da0..9ffa39b 100644 --- a/themes/typing/layout/_partial/post/gallery.ejs +++ b/themes/typing/layout/_partial/post/gallery.ejs @@ -1,7 +1,7 @@ <% if (post.photos && post.photos.length) { %>
- <% post.photos.forEach(function(photo, i) { %> + <% post.photos.forEach((photo, i) => { %>