git ssb

1+

Matt McKegg / mutant



Commit a1abe9b483bc5d56548a660d97c1e2290a176d19

map: fix include check

Matt McKegg committed on 7/8/2016, 4:55:45 AM
Parent: c01dae98743153d400531ac256fb74b5ca35138e

Files changed

map.jschanged
map.jsView
@@ -195,16 +195,19 @@
195195 return 0
196196 }
197197
198198 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') {
200204 var array = this()
201205 if (array && array.includes) {
202- array.includes(value)
206 + return !array.includes(value)
203207 }
204- } else {
205- return !this.includes(value)
206208 }
209 + return true
207210 }
208211
209212 function deleteEntry (entry) {
210213 this.delete(entry)

Built with git-ssb-web