[Pkg-javascript-commits] [node-es6-module-transpiler] 06/09: Workaround for upstream issue 199

Julien Puydt julien.puydt at laposte.net
Tue Oct 20 07:14:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository node-es6-module-transpiler.

commit 281c92340088a1455493c7a82d47066c7153d041
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Mon Oct 19 22:25:23 2015 +0200

    Workaround for upstream issue 199
---
 lib/module.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/module.js b/lib/module.js
index 96529c5..a659641 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -136,7 +136,11 @@ memo(Module.prototype, 'ast', /** @this Module */function() {
  * @name Module#src
  */
 memo(Module.prototype, 'src', /** @this Module */function() {
-  return fs.readFileSync(this.path).toString();
+  if (endsWith(this.path, '.js')) {
+     return fs.readFileSync(this.path).toString();
+  } else {
+     return fs.readFileSync(this.path+'.js').toString();
+  };
 });
 
 /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-es6-module-transpiler.git



More information about the Pkg-javascript-commits mailing list