Skip to content

Commit

Permalink
style: use String.includes instead of indexOf
Browse files Browse the repository at this point in the history
Co-authored-by: Ward Peeters <ward@coding-tech.com>
  • Loading branch information
axe312ger and wardpeet committed Mar 29, 2021
1 parent b6a7dd5 commit 217529b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-source-contentful/src/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ ${formatPluginOptionsForCLI(pluginConfig.getOriginalPluginOptions(), errors)}`,
} catch (e) {
// Back off page limit if responses content length exceeds Contentfuls limits.
if (
e.responseData.data.message.indexOf(`Response size too big`) !== -1 &&
e.responseData.data.message.includes(`Response size too big`) &&
currentPageLimit > 1
) {
lastCurrentPageLimit = currentPageLimit
Expand Down

0 comments on commit 217529b

Please sign in to comment.