Fix scoping error in coffee-script.coffee

Closes #4167.
This commit is contained in:
Simon Lydell
2016-01-07 07:21:05 +01:00
parent b8403bfa97
commit ae72dbb379
2 changed files with 9 additions and 7 deletions

View File

@@ -175,7 +175,7 @@ exports.register = -> require './register'
# Throw error with deprecation warning when depending upon implicit `require.extensions` registration
if require.extensions
for ext in @FILE_EXTENSIONS
for ext in @FILE_EXTENSIONS then do (ext) ->
require.extensions[ext] ?= ->
throw new Error """
Use CoffeeScript.register() or require the coffee-script/register module to require #{ext} files.