mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
make profile-require.js not to require files.js
This commit is contained in:
@@ -26,9 +26,10 @@ RequireInvocation.prototype.isOurCode = function () {
|
||||
if (! self.name.match(/\//))
|
||||
return false; // we always require our stuff via a path
|
||||
|
||||
var files = require('./files.js');
|
||||
var ourSource = files.pathResolve(__dirname);
|
||||
var required = files.pathResolve(files.pathDirname(self.filename), self.name);
|
||||
// it is OK to use path here and not files.js as we are just checking the path
|
||||
var path = require('path');
|
||||
var ourSource = path.resolve(__dirname);
|
||||
var required = path.resolve(path.dirname(self.filename), self.name);
|
||||
if (ourSource.length > required.length)
|
||||
return false;
|
||||
return required.substr(0, ourSource.length) === ourSource;
|
||||
|
||||
Reference in New Issue
Block a user