mirror of
https://github.com/vale981/accounts-ui
synced 2025-03-04 17:31:41 -05:00
Fixed issue with faulty object iteration.
This commit is contained in:
parent
d4f5fb941b
commit
b046af39ba
1 changed files with 6 additions and 3 deletions
|
@ -97,7 +97,8 @@ Accounts.ui.config = function(options) {
|
|||
|
||||
// Deal with `requestPermissions`
|
||||
if (options.requestPermissions) {
|
||||
options.requestPermissions.forEach(function (scope, service) {
|
||||
Object.keys(options.requestPermissions).forEach(service => {
|
||||
const score = options.requestPermissions[service];
|
||||
if (Accounts.ui._options.requestPermissions[service]) {
|
||||
throw new Error("Accounts.ui.config: Can't set `requestPermissions` more than once for " + service);
|
||||
}
|
||||
|
@ -112,7 +113,8 @@ Accounts.ui.config = function(options) {
|
|||
|
||||
// Deal with `requestOfflineToken`
|
||||
if (options.requestOfflineToken) {
|
||||
options.requestOfflineToken.forEach(function (value, service) {
|
||||
Object.keys(options.requestOfflineToken).forEach(service => {
|
||||
const value = options.requestOfflineToken[service];
|
||||
if (service !== 'google')
|
||||
throw new Error("Accounts.ui.config: `requestOfflineToken` only supported for Google login at the moment.");
|
||||
|
||||
|
@ -127,7 +129,8 @@ Accounts.ui.config = function(options) {
|
|||
|
||||
// Deal with `forceApprovalPrompt`
|
||||
if (options.forceApprovalPrompt) {
|
||||
options.forceApprovalPrompt.forEach(function (value, service) {
|
||||
Object.keys(options.forceApprovalPrompt).forEach(service => {
|
||||
const value = options.forceApprovalPrompt[service];
|
||||
if (service !== 'google')
|
||||
throw new Error("Accounts.ui.config: `forceApprovalPrompt` only supported for Google login at the moment.");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue