Skip to content

Commit

Permalink
Fixed export in nlp.js
Browse files Browse the repository at this point in the history
This causes Webpack to fail. I already have to manually patch RRule in order to get to/fromText working within Webpack. Example:

```
import RRule from 'rrule';
RRule.RRule = RRule;
let nlp = require('rrule/lib/nlp');

RRule.prototype.toText = function (gettext, language) {
  return nlp.toText(this, gettext, language);
};

RRule.prototype.fromText = function (text, language) {
  return nlp.fromText(text, language);
};
```
  • Loading branch information
jeffijoe committed Nov 25, 2015
1 parent cc6c507 commit 8b791d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nlp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ if (serverSide) {
if (typeof define === "function" && define.amd) {
/*global define:false */
define("rrule", [], function () {
return RRule;
return nlp;
});
}

Expand Down

0 comments on commit 8b791d5

Please sign in to comment.