aboutsummaryrefslogtreecommitdiffstats
path: root/src/data/Data.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-04-20 18:11:18 +0200
committerGitHub <noreply@github.com>2020-04-20 18:11:18 +0200
commit65e909844c2d064606217b47e92eff12ebdb79de (patch)
treef1ac76622884ebca66ccf99b188a1c130db8224a /src/data/Data.js
parent763dd3fefa504a496c2fbdb94c1c04150fba07e6 (diff)
downloadjquery-65e909844c2d064606217b47e92eff12ebdb79de.tar.gz
jquery-65e909844c2d064606217b47e92eff12ebdb79de.zip
Data: Make the data object a regular object again
The change in gh-4603 made the object returned by `elem.data()` a prototype-less object. That's a desired change to support keys colliding with `Object.prototype` properties but it's also a breaking change so it has to wait for jQuery 4.0.0. A 3.x-only test was added to avoid breaking it in the future on this branch. Fixes gh-4665 Ref gh-4603 Closes gh-4666
Diffstat (limited to 'src/data/Data.js')
-rw-r--r--src/data/Data.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/Data.js b/src/data/Data.js
index ce6d8fa9b..31ff4318c 100644
--- a/src/data/Data.js
+++ b/src/data/Data.js
@@ -22,7 +22,7 @@ Data.prototype = {
// If not, create one
if ( !value ) {
- value = Object.create( null );
+ value = {};
// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.