Skip to content

Commit 0fe19eb

Browse files
Merge pull request mdn#209 from VincentDaviet/pr-nyt-if-condition
Refactor IF condition to make it more simple
2 parents 1a20b80 + 2969ee7 commit 0fe19eb

File tree

1 file changed

+1
-3
lines changed
  • javascript/apis/third-party-apis/nytimes

1 file changed

+1
-3
lines changed

javascript/apis/third-party-apis/nytimes/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,8 @@ <h1>NY Times article search</h1>
176176
function previousPage(e) {
177177
if(pageNumber > 0) {
178178
pageNumber--;
179-
} else {
180-
return;
179+
fetchResults(e);
181180
}
182-
fetchResults(e);
183181
};
184182

185183
</script>

0 commit comments

Comments
 (0)