Skip to content

Commit 21f0e02

Browse files
committedAug 17, 2020
Fix init error when database was not created yet
1 parent 521d11f commit 21f0e02

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed
 

‎dist/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smdbox",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"main": "src/index.jsx",
55
"repository": "https://github.com/semrush/smdbox",
66
"author": "Semrush",

‎src/components/Project/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Project extends React.Component {
5858
}
5959

6060

61-
componentWillReceiveProps({ endpoint, smdUrl }) {
61+
UNSAFE_componentWillReceiveProps({ endpoint, smdUrl }) { // eslint-disable-line
6262
if (endpoint !== this.props.endpoint) {
6363
this.setState({ endpoint });
6464
}
@@ -203,7 +203,7 @@ class Project extends React.Component {
203203
bsStyle={mode === modes.SETTINGS ? 'primary' : 'success'}
204204
type="submit"
205205
onClick={this.onSubmit}
206-
disabled={this.props.smdScheme === null}
206+
disabled={this.props.smdScheme === null || this.props.fetchingSmdError}
207207
>
208208
{ mode === modes.SETTINGS ? 'Update' : 'Create' }
209209
</Button>

‎src/configureStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function (initialData) {
3030
...enhancers
3131
)
3232
);
33-
33+
3434
syncStore(store);
3535

3636
sagaMiddleware.run(rootSaga);

‎src/helpers/session.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const connectDB = (f) => {
1919
};
2020
request.onupgradeneeded = function (e) {
2121
e.currentTarget.result.createObjectStore(storeName);
22-
connectDB(f);
22+
// connectDB(f); // no need to reconnect
2323
};
2424
};
2525

0 commit comments

Comments
 (0)