1
0
Fork 0

For #8752: fix invalid AutoplayAction crash

master
Severin Rudie 2020-02-25 21:37:44 -08:00 committed by GitHub
parent b8d5dc4551
commit c87c837865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ class Settings private constructor(
private fun Int.toAutoplayAction() = when (this) {
BLOCKED_INT -> AutoplayAction.BLOCKED
ALLOWED_INT -> AutoplayAction.ALLOWED
// Users from older versions may have saved invalid values. Migrate them to BLOCKED
ASK_TO_ALLOW_INT -> AutoplayAction.BLOCKED
else -> throw InvalidParameterException("$this is not a valid SitePermissionsRules.AutoplayAction")
}