Commit f5dc464093a9857f6d9410c8dac617b5c4e435cd
make sure "whitepage" bug is fixed in mvd too
Ev Bogue committed on 6/22/2018, 12:34:54 AMParent: e29b9cacf9b2690e0622dde43b93bdaa71290524
Files changed
config.js | changed |
config.js | ||
---|---|---|
@@ -2,17 +2,19 @@ | ||
2 | 2 … | |
3 | 3 … | module.exports = function () { |
4 | 4 … | var host = window.location.origin |
5 | 5 … | |
6 | - http.get(host + '/get-config', function (res) { | |
7 | - res.on('data', function (data, remote) { | |
8 | - config = data | |
9 | - localStorage[host] = config | |
6 … | + if (localStorage[host]) | |
7 … | + var config = JSON.parse(localStorage[host]) | |
8 … | + else | |
9 … | + http.get(host + '/get-config', function (res) { | |
10 … | + res.on('data', function (data, remote) { | |
11 … | + var config = data | |
12 … | + localStorage[host] = config | |
13 … | + location.reload() | |
14 … | + }) | |
10 | 15 … | }) |
11 | - }) | |
12 | 16 … | |
13 | - var config = JSON.parse(localStorage[host]) | |
14 | - | |
15 | 17 … | config.blobsUrl = host + '/blobs/get/' |
16 | 18 … | config.emojiUrl = host + '/img/emoji/' |
17 | 19 … | |
18 | 20 … | if (config.ws.remote) |
Built with git-ssb-web