mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 11:44:34 +00:00
fix: stringify json file
This commit is contained in:
@@ -261,8 +261,10 @@ const useEditor = ({
|
|||||||
axios
|
axios
|
||||||
.get(`/SASjsApi/drive/file?_filePath=${selectedFilePath}`)
|
.get(`/SASjsApi/drive/file?_filePath=${selectedFilePath}`)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
setPrevFileContent(res.data)
|
const content =
|
||||||
setFileContent(res.data)
|
typeof res.data === 'object' ? JSON.stringify(res.data) : res.data
|
||||||
|
setPrevFileContent(content)
|
||||||
|
setFileContent(content)
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
setModalTitle('Abort')
|
setModalTitle('Abort')
|
||||||
|
|||||||
Reference in New Issue
Block a user