Fix function handling

master
Sven Slootweg 5 years ago
parent 767d84908f
commit d28810eb64

@ -125,6 +125,10 @@ Note that this also means that a custom error-throwing handler is not possible i
## Changelog
### v1.0.1 (June 3, 2020)
* __Bugfix:__ Fixed function handling; they were interpreted as literals in non-literal mode and vice versa. It now works correctly, according to what the documentation specifies.
### v1.0.0 (March 23, 2020)
Initial release.

@ -22,9 +22,9 @@ function doMatchValue(value, arms, functionsAreLiterals) {
}
module.exports = function matchValue(value, arms) {
return doMatchValue(value, arms, true);
return doMatchValue(value, arms, false);
};
module.exports.literal = function matchValueLiteral(value, arms) {
return doMatchValue(value, arms, false);
return doMatchValue(value, arms, true);
};

Loading…
Cancel
Save