fix(core): safe important check (#10455)

This commit is contained in:
William Sedlacek
2023-12-19 10:11:10 -08:00
committed by GitHub
parent 4b74b96940
commit 172d3463a3
3 changed files with 10 additions and 4 deletions

View File

@ -21,12 +21,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20.10.0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- name: Install Python
uses: actions/setup-python@v4
@ -49,6 +49,8 @@ jobs:
- name: Create Emulator
uses: rigor789/action-create-emulator@main
with:
package: system-images;android-34;default;x86_64
- name: Test (Android)
run: node tools/scripts/run-automated.js android

View File

@ -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()) {

View File

@ -8,7 +8,7 @@ const spawn = require('child_process').spawn
const kill = require('tree-kill');
const path = require('path');
const TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
const TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes (is Github CI this slow to boot AVDs?)
const workspaceDir = path.resolve(__dirname, '../..');
const platform = process.argv[2];
const spawned_process = spawn(