Skip to content

Commit

Permalink
Merge pull request #667 from wp-media/fix/665-v
Browse files Browse the repository at this point in the history
fix #665 use a more distinctive pattern for version number replacement
  • Loading branch information
Screenfeed authored Dec 19, 2017
2 parents 7aa3ade + 9600ce1 commit 681e307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/front/lazyload.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function rocket_lazyload_script() {
var s = d.createElement("script"); s.async = true;
var v = !("IntersectionObserver" in w) ? "8.5.2" : "10.3.5";
s.src = "' . get_rocket_cdn_url( WP_ROCKET_FRONT_JS_URL . 'lazyload-v' . $suffix . '.js', array( 'all', 'css_and_js', 'js' ) ) . '";
s.src = s.src.replace( "-v", "-" + v );
s.src = s.src.replace( "lazyload-v", "lazyload-" + v );
w.lazyLoadOptions = {
elements_selector: "img, iframe",
data_src: "lazy-src",
Expand Down

0 comments on commit 681e307

Please sign in to comment.