• Resolved eumene

    (@eumene)


    Hi all

    I found this issue.

    If the plugin is enabled, this js code snippet has a strange behavior:
    a = []; for (let x in a) {console.log(a[x]);}

    Array a is empty but the for loop print an element “function shuffle()”

    The prototype function is defined into jquery.gridrotator.js (line 57 – original file)
    If I comment this line, the previous snippet has expected behavior: no item printed.

    This behavior causes issue with other plugins.

    https://stackoverflow.com/questions/948358/adding-custom-functions-into-array-prototype

    Please, fix it so we can use your plugin!

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘js issue – Array.prototype.shuffle() method cause error with `for (let x in a)`’ is closed to new replies.