Commit ec814212 authored by Alice Boxhall's avatar Alice Boxhall Committed by Commit Bot

[Devtools] Don't try to update _contrastDetails if _contrastInfo doesn't exist

Bug: 514674
Change-Id: I122ca163f9738e825e80c179e5dff803b488295d
Reviewed-on: https://chromium-review.googlesource.com/807336
Commit-Queue: Alice Boxhall <aboxhall@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521621}
parent 5affd5cc
......@@ -591,8 +591,10 @@ ColorPicker.Spectrum = class extends UI.VBox {
* @param {?SDK.CSSModel.ContrastInfo} contrastInfo
*/
setContrastInfo(contrastInfo) {
if (this._contrastInfo)
this._contrastInfo.update(contrastInfo);
if (!this._contrastInfo)
return;
this._contrastInfo.update(contrastInfo);
// Contrast info may cause contrast details to become visible.
if (this._contrastDetails.visible())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment