mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-07-28 04:08:05 +00:00
Update to create-react-app 4
- had to update eslint deps - ran into https://github.com/palantir/blueprint/issues/4112 - had to move beta.svg out of static/ - had to fix prettier formatting changes - ran into https://github.com/facebook/jest/issues/7780
This commit is contained in:
committed by
David Lechner
parent
b9175543fd
commit
71ad9c1b1b
@@ -14,5 +14,9 @@ module.exports = class CustomTestEnvironment extends Environment {
|
||||
if (this.global.TextDecoder === undefined) {
|
||||
this.global.TextDecoder = TextDecoder;
|
||||
}
|
||||
|
||||
// work around https://github.com/facebook/jest/issues/7780
|
||||
this.global.Uint8Array = Uint8Array;
|
||||
this.global.ArrayBuffer = ArrayBuffer;
|
||||
}
|
||||
};
|
||||
|
||||
+2
-2
@@ -94,10 +94,10 @@ export function delay(ms: number): Promise<void> {
|
||||
* @param obj The object
|
||||
* @param id The property path
|
||||
*/
|
||||
export function lookup(obj: object, id: string): string | undefined {
|
||||
export function lookup(obj: unknown, id: string): string | undefined {
|
||||
const value = id
|
||||
.split('.')
|
||||
.reduce((pv, cv) => pv && (pv as Record<string, object>)[cv], obj);
|
||||
.reduce((pv, cv) => pv && (pv as Record<string, unknown>)[cv], obj);
|
||||
if (typeof value === 'string') {
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user