Skip to content

Commit c767cd8

Browse files
committed
chore: logging should check for Trace.isEnabled
1 parent 44ddd70 commit c767cd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/image-common.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ export class ImageBase extends View {
181181
scaleW = nativeWidth > 0 ? measureWidth / nativeWidth : 1;
182182
scaleH = nativeHeight > 0 ? measureHeight / nativeHeight : 1;
183183

184-
CLog(CLogTypes.info, 'computeScaleFactor', measureWidth, measureHeight, nativeWidth, nativeHeight, widthIsFinite, heightIsFinite, aspectRatio, nativeScale, measureScale);
184+
if (Trace.isEnabled()) {
185+
CLog(CLogTypes.info, 'computeScaleFactor', measureWidth, measureHeight, nativeWidth, nativeHeight, widthIsFinite, heightIsFinite, aspectRatio, nativeScale, measureScale);
186+
}
185187
if (aspectRatio > 0) {
186188
if (!widthIsFinite) {
187189
scaleH = 1;

0 commit comments

Comments
 (0)