Skip to content

Commit e645ca2

Browse files
committed
Merge pull request #38 from asmblah/patch-1
[modules] Updated noConflict returns current after restore
2 parents 2091d96 + 529f5b7 commit e645ca2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@
11701170
11711171
- The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated.
11721172
- The file should be named with camelCase, live in a folder with the same name, and match the name of the single export.
1173-
- Add a method called noConflict() that sets the exported module to the previous version.
1173+
- Add a method called noConflict() that sets the exported module to the previous version and returns this one.
11741174
- Always declare `'use strict';` at the top of the module.
11751175

11761176
```javascript
@@ -1187,6 +1187,7 @@
11871187
11881188
FancyInput.noConflict = function noConflict() {
11891189
global.FancyInput = previousFancyInput;
1190+
return FancyInput;
11901191
};
11911192
11921193
global.FancyInput = FancyInput;

0 commit comments

Comments
 (0)