Skip to content

Commit 6309d47

Browse files
committed
Update CloudCodeRouter.js
1 parent ca7cec8 commit 6309d47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Routers/CloudCodeRouter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class CloudCodeRouter extends PromiseRouter {
136136
}
137137
static getCloudFile(req) {
138138
const file = req.url.replace('/scripts', '');
139-
const dirName = __dirname.split('lib')[0];
139+
const dirName = __dirname.split('lib')[0].split('node_modules')[0];
140140
const filePath = path.join(dirName, file);
141141
if (!fs.existsSync(filePath) || !fs.lstatSync(filePath).isFile()) {
142142
throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'Invalid file url.');

0 commit comments

Comments
 (0)