Commit a1abe9b483bc5d56548a660d97c1e2290a176d19
map: fix include check
Matt McKegg committed on 7/8/2016, 4:55:45 AMParent: c01dae98743153d400531ac256fb74b5ca35138e
Files changed
map.js | changed |
map.js | ||
---|---|---|
@@ -195,16 +195,19 @@ | ||
195 | 195 … | return 0 |
196 | 196 … | } |
197 | 197 … | |
198 | 198 … | function notIncluded (value) { |
199 | - if (typeof this === 'function' && !value.includes) { | |
199 … | + if (this.includes) { | |
200 … | + return !this.includes(value) | |
201 … | + } else if (this.indexOf) { | |
202 … | + return !~this.indexOf(value) | |
203 … | + } else if (typeof this === 'function') { | |
200 | 204 … | var array = this() |
201 | 205 … | if (array && array.includes) { |
202 | - array.includes(value) | |
206 … | + return !array.includes(value) | |
203 | 207 … | } |
204 | - } else { | |
205 | - return !this.includes(value) | |
206 | 208 … | } |
209 … | + return true | |
207 | 210 … | } |
208 | 211 … | |
209 | 212 … | function deleteEntry (entry) { |
210 | 213 … | this.delete(entry) |
Built with git-ssb-web