Fix SFLayer TypeErrors in Winscope
Fix the errors that pop up when clicking `SurfaceFlingerLayer` in SurfaceFlingerTrace panel's Hierarchy panel, by taking care of cases where the property is null. Bug: 240405932 Test: manual on local build of Winscope Change-Id: Ic9e8f6e75dcfde8af97aeb5254d1e2d8f7b3d669
This commit is contained in:
@@ -37,7 +37,7 @@ export default {
|
||||
summarizer(layer) {
|
||||
const summary = [];
|
||||
|
||||
if (layer?.visibilityReason.length > 0) {
|
||||
if (layer?.visibilityReason?.length > 0) {
|
||||
let reason = "";
|
||||
if (Array.isArray(layer.visibilityReason)) {
|
||||
reason = layer.visibilityReason.join(", ");
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<template>
|
||||
<div class="matrix">
|
||||
<div class="matrix" v-if="transform">
|
||||
<md-tooltip>{{ transform.getTypeAsString() }}</md-tooltip>
|
||||
<div class="cell">{{ formatFloat(transform.matrix.dsdx) }}</div>
|
||||
<div class="cell">{{ formatFloat(transform.matrix.dsdy) }}</div>
|
||||
|
||||
Reference in New Issue
Block a user