mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): safe important check (#10455)
This commit is contained in:
@@ -2,7 +2,11 @@ import { Trace } from '../../trace';
|
||||
import { CoreTypes } from '../../core-types';
|
||||
import { Length } from './style-properties';
|
||||
|
||||
export function cleanupImportantFlags(value: string, propertyName: string) {
|
||||
export function cleanupImportantFlags(value: unknown, propertyName: string) {
|
||||
if (typeof value !== 'string') {
|
||||
return '' + value;
|
||||
}
|
||||
|
||||
const index = value?.indexOf('!important');
|
||||
if (index >= 0) {
|
||||
if (Trace.isEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user