Skip to content

Commit e87244f

Browse files
committed
chore: revert lost changes
1 parent 900538b commit e87244f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ui-canvaslabel/canvaslabel.common.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ import {
1717
profile
1818
} from '@nativescript/core';
1919
import { FontStyleType, FontWeightType } from '@nativescript/core/ui/styling/font';
20-
import lazy from '@nativescript/core/utils/lazy';
2120

2221
const toDpi = Utils.layout.toDeviceIndependentPixels;
2322
export const paintCache: { [k: string]: Paint } = {};
2423
export const paintFontCache = {};
25-
const sdkVersion = lazy(() => parseInt(Device.sdkVersion, 10));
2624

2725
// init text to ensure font overrides are called
2826
init();
@@ -237,7 +235,9 @@ export abstract class Span extends Shape {
237235
if (letterSpacing) {
238236
cachedPaint.setLetterSpacing(letterSpacing);
239237
}
240-
cachedPaint.color = color;
238+
if (color) {
239+
cachedPaint.color = color;
240+
}
241241
this.mStaticlayout = new StaticLayout(text, cachedPaint, w, align, 1, 0, true);
242242
return this.mStaticlayout;
243243
}

0 commit comments

Comments
 (0)