mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-03 11:59:23 +00:00
REST API: JavaScript client should use _.extend
when merging objects.
Correct an issue during the client's dynamic route discovery in `wp.api.utils.decorateFromRoute` where `_.union` potentially failed if used on objects. Props ketuchetan, adamsilverstein. Merges [40040] to the 4.7 branch. Fixes #39341. Built from https://develop.svn.wordpress.org/branches/4.7@40084 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5789e5f074
commit
cb22496f4c
@ -185,7 +185,7 @@
|
||||
} else {
|
||||
|
||||
// We already have args, merge these new args in.
|
||||
modelInstance.prototype.args = _.union( routeEndpoint.args, modelInstance.prototype.defaults );
|
||||
modelInstance.prototype.args = _.extend( modelInstance.prototype.args, routeEndpoint.args );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -202,7 +202,7 @@
|
||||
} else {
|
||||
|
||||
// We already have options, merge these new args in.
|
||||
modelInstance.prototype.options = _.union( routeEndpoint.args, modelInstance.prototype.options );
|
||||
modelInstance.prototype.options = _.extend( modelInstance.prototype.options, routeEndpoint.args );
|
||||
}
|
||||
}
|
||||
|
||||
|
2
wp-includes/js/wp-api.min.js
vendored
2
wp-includes/js/wp-api.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7.3-alpha-40083';
|
||||
$wp_version = '4.7.3-alpha-40084';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user