Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 5112a47

Browse files
fluggCaerusKaru
authored andcommitted
fix(core): fail-safe check of nullable value (#1031)
Make sure the lookupStyle method in StyleUtils return a string. On old browsers getPropertyValue() of getComputedStyle() returns a null instead of empty string. Fixes #958
1 parent af15a61 commit 5112a47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/core/style-utils/style-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export class StyleUtils {
9898

9999
// Note: 'inline' is the default of all elements, unless UA stylesheet overrides;
100100
// in which case getComputedStyle() should determine a valid value.
101-
return value.trim();
101+
return value ? value.trim() : '';
102102
}
103103

104104
/**

0 commit comments

Comments
 (0)