]> source.dussan.org Git - jquery.git/commitdiff
Data: avoid non-alphanumeric chars in expando properties
authorJason Bedard <jason+github@jbedard.ca>
Tue, 23 Sep 2014 03:05:59 +0000 (20:05 -0700)
committerOleg Gaidarenko <markelog@gmail.com>
Fri, 26 Sep 2014 11:03:05 +0000 (15:03 +0400)
Ref chromium issue 378607
Ref #14839
Closes gh-1662

src/data/Data.js

index 423bef55bdcf4e34e7f2c6458009c2017338d752..85afd64f54b4427fe5cdc65c2edaf8f96fa6a1d9 100644 (file)
@@ -14,7 +14,7 @@ function Data() {
                }
        });
 
-       this.expando = jQuery.expando + Math.random();
+       this.expando = jQuery.expando + Data.uid++;
 }
 
 Data.uid = 1;