more tweaking to server consent flow and changing servers on preview

This commit is contained in:
Bruno Windels
2020-12-04 13:59:52 +01:00
parent 4d57b3c5da
commit aa62f1fedc
11 changed files with 88 additions and 32 deletions
+25
View File
@@ -0,0 +1,25 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
export function orderedUnique(array) {
const copy = [];
for (let i = 0; i < array.length; ++i) {
if (i === 0 || array.lastIndexOf(array[i], i - 1) === -1) {
copy.push(array[i]);
}
}
return copy;
}