Title: JS Error: i.breakpoints.replace is not a function
Last modified: January 5, 2025

---

# JS Error: i.breakpoints.replace is not a function

 *  Resolved [gregdotel](https://wordpress.org/support/users/gregdotel/)
 * (@gregdotel)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/)
 * After updating to 1.2.15 I’m getting this message in the console:
 * TypeError: i.breakpoints.replace is not a function
   at e.init_options (frontend_block.
   js?ver=1.2.15:1:757)at e.init (frontend_block.js?ver=1.2.15:1:66)at frontend_block.
   js?ver=1.2.15:1:2117

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [chris](https://wordpress.org/support/users/achensee/)
 * (@achensee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18233901)
 * We have the same problem. With programmatically implemented swiperjs slides, 
   these were displayed corrupted due to the breakpoints replace function. The error
   can be temporarily fixed by commenting out the line i.breakpoints = JSON.parse…
   in frontend_blocks.js. is commented out.
 * `if (i.breakpoints) {
   // i.breakpoints = JSON.parse(i.breakpoints.replace(/\\/
   g, ""));}
 *  Plugin Author [digitalapps](https://wordpress.org/support/users/digitalapps/)
 * (@digitalapps)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18234342)
 * Since we migrated to data-swiper JSON object, please make sure that your json
   object contains breakpoints key. See image below, let me know if this doesnt 
   make sense. And may share you html or for the swiper, in particular where you
   have config data attributes.
   [https://imgur.com/yF6dVCw](https://imgur.com/yF6dVCw)
 *  [chris](https://wordpress.org/support/users/achensee/)
 * (@achensee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18234468)
 * Thanks [@digitalapps](https://wordpress.org/support/users/digitalapps/) for your
   quick reply.
   We already used data-swiper JSON objects and this is our code in
   our twig template, that used to work before 1.2.15
 * `<div class="swiper-container swiper swiper-initialized swiper-horizontal swiper-
   autoheight swiper-backface-hidden gallery-{{ album_id }} gallery" data-debug="
   true" data-swiper='{"slidesPerView":"1","navigation":false,"pagination":{"type":"
   bullets","clickable":true},"delay":3000,"speed":500,"loop":false,"direction":"
   horizontal","slidesOffsetBefore":0,"slidesOffsetAfter":0,"autoHeight":true,"spaceBetween":
   20,"releaseOnEdges":false,"effect":"slide","breakpoints":{"768":{"slidesPerView":
   2},"1280":{"slidesPerView":3},"1440":{"slidesPerView":{{spv}}}}}'>`
 * Even if we add \ before the ” as shown in your example, the slides and breakpoints
   will not be shown correctly.
 *  Plugin Author [digitalapps](https://wordpress.org/support/users/digitalapps/)
 * (@digitalapps)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18235429)
 * Update pushed that should resolve the issue on custom swipers. please update 
   and let me know how it goes.
 *  [chris](https://wordpress.org/support/users/achensee/)
 * (@achensee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18235774)
 * Updatet to 1.2.16 but Error isn’t resolved. Console shows
 * `frontend_block.js?ver=1.2.16:1 JS Error:
   (anonym) @ frontend_block.js?ver=1.2.16:
   1frontend_block.js?ver=1.2.16:1 TypeError: i.breakpoints.includes is not a functionat
   e.init_options (frontend_block.js?ver=1.2.16:1:732)at e.init (frontend_block.
   js?ver=1.2.16:1:66)at frontend_block.js?ver=1.2.16:1:2186
 * We have more than one wp-slider per page implemented, maybe that’s a hint?
    -  This reply was modified 1 year, 4 months ago by [chris](https://wordpress.org/support/users/achensee/).
 *  Plugin Author [digitalapps](https://wordpress.org/support/users/digitalapps/)
 * (@digitalapps)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18237618)
 * Please update, I tried running a custom config on my end, and it worked!
   Interested
   to hear if it works on your end.
 *  [chris](https://wordpress.org/support/users/achensee/)
 * (@achensee)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18237918)
 * Updated to 1.2.17: the error has gone, custom sliders work.
 * Thank you for the fix!
 *  Thread Starter [gregdotel](https://wordpress.org/support/users/gregdotel/)
 * (@gregdotel)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18238363)
 * It’s working great now. Thank you so much for your time.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘JS Error: i.breakpoints.replace is not a function’ is closed to new replies.

 * ![](https://ps.w.org/wp-swiper/assets/icon-256x256.png?rev=2402464)
 * [WP Swiper](https://wordpress.org/plugins/wp-swiper/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-swiper/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-swiper/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-swiper/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-swiper/reviews/)

## Tags

 * [breakpoints](https://wordpress.org/support/topic-tag/breakpoints/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 8 replies
 * 3 participants
 * Last reply from: [gregdotel](https://wordpress.org/support/users/gregdotel/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/js-error-i-breakpoints-replace-is-not-a-function/#post-18238363)
 * Status: resolved