mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
fix(ExtensionInstallerJob): Don't crash when request list is empty
This commit is contained in:
parent
7f05d16039
commit
fbb4112eac
1 changed files with 3 additions and 0 deletions
|
@ -183,6 +183,9 @@ class ExtensionInstallerJob(val context: Context, workerParams: WorkerParameters
|
|||
.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
|
||||
.build()
|
||||
}
|
||||
|
||||
if (requests.isEmpty()) return
|
||||
|
||||
var workContinuation = WorkManager.getInstance(context)
|
||||
.beginUniqueWork(TAG, ExistingWorkPolicy.REPLACE, requests.first())
|
||||
for (i in 1 until requests.size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue