Skip to content

Commit

Permalink
fix: Fix fetching product.json file content
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Jan 7, 2025
1 parent c97bc9d commit f14588e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/src/vs/platform/product/common/che/product.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**********************************************************************
* Copyright (c) 2024 Red Hat, Inc.
* Copyright (c) 2024-2025 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand All @@ -9,17 +9,17 @@
***********************************************************************/
/* eslint-disable header/header */

import { FileAccess } from '../../../../base/common/network.js';
import { IProductConfiguration } from '../../../../base/common/product.js';

export function loadFromFileSystem(): IProductConfiguration {
const href = `./oss-dev/static/product.json`;

const href = FileAccess.asBrowserUri('vs/../../product.json').toString(true);
try {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", href, false);
const xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', href, false);
xmlhttp.send();

if (xmlhttp.status == 200 && xmlhttp.readyState == 4) {
if (xmlhttp.status === 200 && xmlhttp.readyState === 4) {
return JSON.parse(xmlhttp.responseText);
}

Expand Down

0 comments on commit f14588e

Please sign in to comment.