mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 22:58:40 +02: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. Fixes #39341. Built from https://develop.svn.wordpress.org/trunk@40040 git-svn-id: http://core.svn.wordpress.org/trunk@39977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f855f46b0
commit
717aeab3cc
@ -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.8-alpha-40039';
|
||||
$wp_version = '4.8-alpha-40040';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user