mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 03:34:03 +00:00
Tests: Deeply extend prev state for test correctness
As it is, that test is passing the same previous state and current state because extend by default only copies one level deep, resulting in the manual mutation mutating both prev and current state. This passes because the change listener always sets the link visibility from the current state regardless of the previous state (it is doing redundant work, but not too much). Change-Id: I8cf125cc4f6833fbce0fe14bdcb4ef550c7e8450
This commit is contained in:
parent
eb981bcd72
commit
ac264001f6
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
prevState = $.extend( {}, this.state );
|
prevState = $.extend( true, {}, this.state );
|
||||||
this.state.preview.enabled = true;
|
this.state.preview.enabled = true;
|
||||||
|
|
||||||
this.footerLinkChangeListener( prevState, this.state );
|
this.footerLinkChangeListener( prevState, this.state );
|
||||||
|
|
Loading…
Reference in a new issue