Fix the Stream.HALT warning's condition
Previously, it warned on all *but* the first use, which is obviously wrong. This corrects it to correctly fire on only the first use.
This commit is contained in:
parent
b91a10a233
commit
2a9b3964ca
2 changed files with 17 additions and 22 deletions
|
|
@ -13,7 +13,7 @@ Stream["fantasy-land/of"] = Stream
|
|||
var warnedHalt = false
|
||||
Object.defineProperty(Stream, "HALT", {
|
||||
get: function() {
|
||||
warnedHalt && console.log("HALT is deprecated and has been renamed to SKIP");
|
||||
warnedHalt || console.log("HALT is deprecated and has been renamed to SKIP");
|
||||
warnedHalt = true
|
||||
return Stream.SKIP
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue