Prepare for webOS & Tizen support

This commit is contained in:
redphx
2024-07-01 17:26:04 +07:00
parent 64d60aedfa
commit c1502b5552
29 changed files with 801 additions and 598 deletions

View File

@@ -576,8 +576,10 @@ export function interceptHttpRequests() {
const response = await NATIVE_FETCH(request, init);
const json = await response.json();
for (const key in FeatureGates) {
json.exp.treatments[key] = FeatureGates[key]
if (json && json.exp && json.treatments) {
for (const key in FeatureGates) {
json.exp.treatments[key] = FeatureGates[key]
}
}
response.json = () => Promise.resolve(json);