Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

muonCb expects an array of results #12844

Merged
merged 1 commit into from
Jan 25, 2018
Merged
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
7 changes: 5 additions & 2 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,14 @@ function registerPermissionHandler (session, partition) {
tempSettings = siteSettings.getSiteSettingsForURL(appState.get('temporarySiteSettings'), origin)
}

let response = new Array(permissionTypes.length)

if (origin == null) {
muonCb(false)
response.fill(false, 0, permissionTypes.length)
muonCb(response)
return
}

let response = []
for (let i = 0; i < permissionTypes.length; i++) {
const responseSizeThisIteration = response.length
const permission = permissionTypes[i]
Expand Down