Fix theoretical NPE

events can't be null based on current usage,
but the function could NPE if used elsewhere.
pull/5156/head
Isaac Levy 2019-05-29 10:11:33 -04:00
parent d791ea8cb0
commit d548586e80
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ private final class History(
}
def versionDebugString: String = {
waitForLoadedEvents
s"${events.lastOption.fold(-1)(_.version.value)}:${
events.headOption.fold(-1)(_.version.value)
}"