git ssb

1+

Matt McKegg / mutant



Commit cad6936104a79a67373781dd13199377e5726f60

set: fix setting empty value

Matt McKegg committed on 10/10/2016, 1:06:42 PM
Parent: 4c9ff2e15d10208c68d4ce7a98c9f26019f94439

Files changed

set.jschanged
set.jsView
@@ -73,11 +73,13 @@
7373
7474 ProtoSet.prototype.set = function (values) {
7575 var self = this
7676 self.sources.length = 0
77- values.forEach(function (value) {
78- self.sources.push(value)
79- })
77 + if (Array.isArray(values)) {
78 + values.forEach(function (value) {
79 + self.sources.push(value)
80 + })
81 + }
8082 self.binder.onUpdate()
8183 }
8284
8385 ProtoSet.prototype.get = function (index) {

Built with git-ssb-web