Skip to content

Commit

Permalink
LDBR-4.61: Починить загрузку аватара (#60)
Browse files Browse the repository at this point in the history
* LDBR-4.61: Починить загрузку аватара

* LDBR-4.61: Исправить не отображение аттачей при создании доски и выпилить SW из дебаг режима

Co-authored-by: Georgiy <[email protected]>
  • Loading branch information
DPeshkoff and GeorgiyX authored Dec 24, 2021
1 parent 44c0ab3 commit 7420205
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ window.addEventListener('resize', (() => {
})(), false);


if ('serviceWorker' in navigator) {
if ('serviceWorker' in navigator && !DEBUG) {
// eslint-disable-next-line no-unused-vars
const serviceWorkerClient = new ServiceWorkerClient(navigator.serviceWorker);
window.addEventListener('load', async () => {
Expand Down
1 change: 1 addition & 0 deletions src/stores/BoardStore/BoardStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ class BoardStore extends BaseStore {
tags: [],
check_lists: [],
access_path: payload.data.access_path,
attachments: [],
});
return;

Expand Down
5 changes: 2 additions & 3 deletions src/stores/SettingsStore/SettingsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,11 @@ class SettingsStore extends BaseStore {

this._storage.get('validation').avatar = validator.validateAvatar(data.avatar);
if (this._storage.get('validation').avatar) {
this._storage.set('avatar', null);
return;
}
}

this._storage.set('avatar', this.__setAvatar(data.avatar));
this._storage.set('avatar', this.__setAvatar(data.avatar));
}

const formdata = new FormData();

Expand Down
14 changes: 7 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ const config = {
},
],
}),
new InjectManifest({
swSrc: './src/sw.js',
swDest: JSON.parse(confDefs.SW_FILE_NAME),
exclude: [
/\.m?js$/,
],
}),
],
mode: confConst.DEBUG ? 'development' : 'production',
devtool: confConst.DEBUG ? 'source-map' : undefined,
Expand All @@ -146,6 +139,13 @@ const config = {

if (!confConst.DEBUG) {
config.optimization.minimizer.push(new TerserPlugin());
config.plugins.push(new InjectManifest({
swSrc: './src/sw.js',
swDest: JSON.parse(confDefs.SW_FILE_NAME),
exclude: [
/\.m?js$/,
],
}));
}

module.exports = config;

0 comments on commit 7420205

Please sign in to comment.