Created
August 6, 2015 17:45
-
-
Save joliss/fcf00ce6df3d136e0359 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function CachingWriter(inputTrees, options) { | |
| if (Array.isArray(inputTrees)) { | |
| if (this.enforceSingleInputTree) { // <---- in ES6, `this` is not defined before super | |
| throw new Error('You passed an array of input trees, but only a single tree is allowed.'); | |
| } | |
| inputTrees = inputTrees; | |
| } else { | |
| inputTrees = [inputTrees]; | |
| } | |
| Plugin.call(this, inputTrees); | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment