[wp-trac] [WordPress Trac] #26061: Customizer settings with non-scalar values incorrectly trigger as changed
WordPress Trac
noreply at wordpress.org
Tue Dec 3 00:07:50 UTC 2013
#26061: Customizer settings with non-scalar values incorrectly trigger as changed
------------------------------+----------------------
Reporter: westonruter | Owner: ocean90
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.8
Component: Appearance | Version: 3.4
Severity: normal | Resolution: fixed
Keywords: has-patch commit |
------------------------------+----------------------
Changes (by ocean90):
* owner: => ocean90
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"26548"]:
{{{
#!CommitTicketReference repository="" revision="26548"
Customizer: Don't trigger a change event if two unchanged object values
are equal.
In JavaScript: `{"title":"Foo"} !== {"title":"Foo"}`
Underscore.js provides an isEqual function to compare two values to see if
they have the same contents, which can be use instead.
Because only one function of Underscore.js is needed we just add a copy of
`_.isEqual` to customize-base.js.
props westonruter.
fixes #26061.
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26061#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list