mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-26 08:55:13 +00:00
Subviews are stored internally on the Subview manager as an object. The object is composed of key-value pairs where the key is a jQuery selector for a view, and the value is an array of views that matching the selector. To extract subviews, `_.flatten()` was used to collate the nested arrays of views into a single view. However, `_.flatten()` is not intended to be used for objects, and this unintended functionality breaks in newer versions of Underscore.js. Instead, we'll use `_.values()` to extract the arrays of views first, and then flatten the array of arrays. Props adamsilverstein. See #34350. Built from https://develop.svn.wordpress.org/trunk@36305 git-svn-id: http://core.svn.wordpress.org/trunk@36272 1a063a9b-81f0-0310-95a4-ce76da25c4cd