fix: scope

This commit is contained in:
FoskyM 2023-10-02 06:04:31 +08:00
parent ca160ae8eb
commit 58d2ed6494
No known key found for this signature in database
GPG key ID: 42C0ED6994AD7E9C
3 changed files with 6 additions and 0 deletions

BIN
js/dist/forum.js generated vendored

Binary file not shown.

BIN
js/dist/forum.js.map generated vendored

Binary file not shown.

View file

@ -69,6 +69,12 @@ export default class AuthorizePage extends IndexPage {
let default_scopes = []; let default_scopes = [];
this.scopes.map(scope => { this.scopes.map(scope => {
let index = scopes_temp.indexOf(scope.scope());
if (index > -1) {
scopes_temp[index] = scope;
} else {
scopes_temp.slice(index, 1);
}
if (scope.is_default() === 1) { if (scope.is_default() === 1) {
default_scopes.push(scope); default_scopes.push(scope);
} }