Skip to content
This repository was archived by the owner on Nov 15, 2020. It is now read-only.
This repository was archived by the owner on Nov 15, 2020. It is now read-only.

set(model: , at : ) bug with zero index, added @discardableResult (CollectionSection/TableSection) #15

@wow-such-amazing

Description

@wow-such-amazing

Is it expected behaviour, that index should be greater than 0?

	public func set(model: ModelProtocol, at index: Int) -> ModelProtocol? {
		guard index > 0, index < self.models.count else { return nil }
		let oldModel = self.models[index]
		self.models[index] = model
		return oldModel
	}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions