Packager: Options Cleanup

Reviewed By: matryoshcow

Differential Revision: D4235221

fbshipit-source-id: 6930a106ed02bec1d77a790641c3dcad46c779b9
This commit is contained in:
Tim Yung
2016-11-28 12:40:11 -08:00
committed by Facebook Github Bot
parent c858420b2d
commit ebc65cecd6
2 changed files with 12 additions and 12 deletions

View File

@@ -10,11 +10,11 @@
const launchEditor = require('../util/launchEditor');
module.exports = function(args) {
module.exports = function({projectRoots}) {
return function(req, res, next) {
if (req.url === '/open-stack-frame') {
var frame = JSON.parse(req.rawBody);
launchEditor(frame.file, frame.lineNumber, args['projectRoots']);
const frame = JSON.parse(req.rawBody);
launchEditor(frame.file, frame.lineNumber, projectRoots);
res.end('OK');
} else {
next();