summaryrefslogtreecommitdiffstats
path: root/spec/source-map.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/source-map.js')
-rw-r--r--spec/source-map.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/source-map.js b/spec/source-map.js
index 6eced9c..8037b88 100644
--- a/spec/source-map.js
+++ b/spec/source-map.js
@@ -1,7 +1,9 @@
/*global CompilerContext, Handlebars */
try {
- var SourceMap = require('source-map'),
- SourceMapConsumer = SourceMap.SourceMapConsumer;
+ if (typeof define !== 'function' || !define.amd) {
+ var SourceMap = require('source-map'),
+ SourceMapConsumer = SourceMap.SourceMapConsumer;
+ }
} catch (err) {
/* NOP for in browser */
}