Skip to content

Commit 6f53789

Browse files
changes
1 parent c65f58a commit 6f53789

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codebolt/codeboltjs",
3-
"version": "1.1.35",
3+
"version": "1.1.36",
44
"description": "",
55
"keywords": [],
66
"author": "",

src/modules/codeutils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const cbcodeutils = {
1616
* @param {string} filePath - The path of the file to retrieve the JS tree for.
1717
* @returns {Promise<GetJsTreeResponse>} A promise that resolves with the JS tree response.
1818
*/
19-
getJsTree: (filePath?: string): Promise<GetJsTreeResponse> => {
19+
getJsTree: (filePath?: string): Promise<any> => {
2020
return new Promise( async (resolve, reject) => {
2121
cbws.getWebsocket.send(JSON.stringify({
2222
"type": "settingEvent",
@@ -62,10 +62,10 @@ const cbcodeutils = {
6262
trees.push(tree);
6363
}
6464

65-
return trees; // Return an array of abstract syntax trees (ASTs)
65+
resolve({ event: 'GetJsTreeResponse',payload:trees}); // Return an array of abstract syntax trees (ASTs)
6666
} catch (error) {
6767
console.error('An error occurred:', error);
68-
return null; // Return null in case of error
68+
return { event: 'GetJsTreeResponse',payload:null}; // Return null in case of error
6969
}
7070
}
7171
});

0 commit comments

Comments
 (0)