Fix broken promise
This commit is contained in:
parent
e265d0d16e
commit
6f2a2a5a9e
|
@ -3,7 +3,7 @@ import data from './data.json'
|
||||||
|
|
||||||
export function getData (path = '') {
|
export function getData (path = '') {
|
||||||
if (path === '') {
|
if (path === '') {
|
||||||
return data
|
return Promise.resolve(data)
|
||||||
} else {
|
} else {
|
||||||
const fileName = '../../content/' + path
|
const fileName = '../../content/' + path
|
||||||
return readFile(fileName)
|
return readFile(fileName)
|
||||||
|
|
Loading…
Reference in New Issue