Skip to content

Commit 495a1b4

Browse files
committed
fix: more nil loro value
1 parent f4fe397 commit 495a1b4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Sources/Loro/Container.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ extension LoroList{
171171
public func insert(pos: UInt32, v: LoroValueLike?) throws {
172172
try self.insert(pos: pos, v: v?.asLoroValue() ?? .null)
173173
}
174+
175+
public func push(v: LoroValueLike?) throws {
176+
try self.push(v: v?.asLoroValue() ?? .null)
177+
}
174178
}
175179

176180
extension LoroMap{
@@ -184,8 +188,23 @@ extension LoroMovableList{
184188
try self.insert(pos: pos, v: v?.asLoroValue() ?? .null)
185189
}
186190

191+
public func push(v: LoroValueLike?) throws {
192+
try self.push(v: v?.asLoroValue() ?? .null)
193+
}
194+
187195
public func set(pos: UInt32, v: LoroValueLike?) throws {
188196
try self.set(pos: pos, value: v?.asLoroValue() ?? .null)
189197
}
190198
}
191199

200+
extension LoroText{
201+
public func mark(from: UInt32, to: UInt32, key: String, value: LoroValueLike?) throws {
202+
try self.mark(from: from, to: to, key: key, value: value?.asLoroValue() ?? .null)
203+
}
204+
}
205+
206+
extension Awareness{
207+
public func setLocalState(value: LoroValueLike?){
208+
self.setLocalState(value: value?.asLoroValue() ?? .null)
209+
}
210+
}

0 commit comments

Comments
 (0)