firepad
firepad copied to clipboard
this.aceRange.fromPoints is not a function
I'm getting this error after running through require.js optimiser and then pressing undo (ctrl-z) when editing.
this.aceRange.fromPoints is not a function
I tracked it down to this line:
this.aceRange = ((_ref = ace.require) != null ? _ref : require)("ace/range").Range;
Which get's optimised to:
this.aceRange==null&&(this.aceRange=(n=ace.require)!=null?n:require("ace/range").Range
Which ends up turning the value of this.aceRange into ace.require
I can fix it by editing the js to:
_ref = ace.require ? ace.require : require;
this.aceRange = _ref("ace/range").Range;
But the coffeescript will need to be tweaked also.
What does require.js optimizer do? It looks like it's both making that line longer and breaking it? :-)
Anyway, I'd welcome a PR to address this somehow.