Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Nodes/Core/AbstractBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ open class AbstractBuilder<ComponentType,
) -> BuildType {
let component: ComponentType = componentFactory(dynamicComponentDependency)
let newComponent: AnyObject = component as AnyObject
assert(newComponent !== lastComponent, "Factory must produce a new component each time it is called")
assert(newComponent !== lastComponent, "Factory must produce a new component each time it is called.")
lastComponent = newComponent
return build(component: component, dynamicBuildDependency: dynamicBuildDependency)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nodes/Core/Config/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ open class Plugin<ComponentType, BuildType, StateType> {
private func makeComponent() -> ComponentType {
let component: ComponentType = componentFactory()
let newComponent: AnyObject = component as AnyObject
assert(newComponent !== lastComponent, "Factory must produce a new component each time it is called")
assert(newComponent !== lastComponent, "Factory must produce a new component each time it is called.")
lastComponent = newComponent
return component
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Nodes/Core/Config/PluginList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ open class PluginList<KeyType: Hashable, ComponentType, BuildType, StateType> {
fileprivate func makeComponent() -> ComponentType {
let component: ComponentType = componentFactory()
let newComponent: AnyObject = component as AnyObject
assert(newComponent !== lastComponent, "Factory must produce a new component each time it is called")
assert(newComponent !== lastComponent, "Factory must produce a new component each time it is called.")
lastComponent = newComponent
return component
}
Expand Down Expand Up @@ -204,7 +204,7 @@ open class PluginList<KeyType: Hashable, ComponentType, BuildType, StateType> {
let keys: [KeyType] = creationOrder(component: component, state: state)
var store: Set<KeyType> = []
let uniqueKeys: [KeyType] = keys.filter { store.insert($0).inserted }
assert(uniqueKeys.count == keys.count, "Keys must be unique \(keys)")
assert(uniqueKeys.count == keys.count, "Keys must be unique: \(keys)")
return uniqueKeys.compactMap { key in plugins.first { $0.key == key } }
}
}
Expand Down