Skip to content

Commit 0a4788a

Browse files
committed
Merge branch 'develop' into spork
2 parents 8942bdd + a55f3ce commit 0a4788a

File tree

6 files changed

+44
-40
lines changed

6 files changed

+44
-40
lines changed

package-lock.json

Lines changed: 27 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/scratch-gui/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@
9393
"react-tooltip": "4.5.1",
9494
"react-virtualized": "9.22.6",
9595
"redux-throttle": "0.1.1",
96-
"scratch-audio": "2.0.85",
96+
"scratch-audio": "2.0.86",
9797
"scratch-blocks": "2.0.0-spork.4",
98-
"scratch-l10n": "5.0.151",
99-
"scratch-paint": "3.0.162",
100-
"scratch-render-fonts": "1.0.169",
101-
"scratch-storage": "4.0.67",
98+
"scratch-l10n": "5.0.152",
99+
"scratch-paint": "3.0.164",
100+
"scratch-render-fonts": "1.0.170",
101+
"scratch-storage": "4.0.70",
102102
"startaudiocontext": "1.2.1",
103103
"style-loader": "4.0.0",
104104
"to-style": "1.3.3",

packages/scratch-gui/src/lib/project-saver-hoc.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ const ProjectSaverHOC = function (WrappedComponent) {
5353
]);
5454
}
5555
componentWillMount () {
56-
if (typeof window === 'object') {
56+
if (!this.props.noBeforeUnloadHandler && typeof window === 'object') {
5757
// Note: it might be better to use a listener instead of assigning onbeforeunload;
5858
// but then it'd be hard to turn this listening off in our tests
5959
window.onbeforeunload = e => this.leavePageConfirm(e);
6060
}
61-
6261
// Allow the GUI consumer to pass in a function to receive a trigger
6362
// for triggering thumbnail or whole project saves.
6463
// These functions are called with null on unmount to prevent stale references.
@@ -343,6 +342,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
343342
onUpdatedProject,
344343
onUpdateProjectData,
345344
onUpdateProjectThumbnail,
345+
noBeforeUnloadHandler,
346346
reduxProjectId,
347347
reduxProjectTitle,
348348
setAutoSaveTimeoutId: setAutoSaveTimeoutIdProp,
@@ -395,6 +395,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
395395
onUpdateProjectData: PropTypes.func,
396396
onUpdateProjectThumbnail: PropTypes.func,
397397
onUpdatedProject: PropTypes.func,
398+
noBeforeUnloadHandler: PropTypes.bool.required,
398399
projectChanged: PropTypes.bool,
399400
reduxProjectId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
400401
reduxProjectTitle: PropTypes.string,
@@ -406,7 +407,8 @@ const ProjectSaverHOC = function (WrappedComponent) {
406407
autoSaveIntervalSecs: 600, // 10 minutes = 600 seconds
407408
onRemixing: () => {},
408409
onSetProjectThumbnailer: () => {},
409-
onSetProjectSaver: () => {}
410+
onSetProjectSaver: () => {},
411+
noBeforeUnloadHandler: false
410412
};
411413
const mapStateToProps = (state, ownProps) => {
412414
const loadingState = state.scratchGui.projectState.loadingState;

packages/scratch-render/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
"jsdoc": "3.6.11",
7676
"json": "9.0.6",
7777
"playwright-chromium": "1.50.1",
78-
"scratch-render-fonts": "1.0.169",
78+
"scratch-render-fonts": "1.0.170",
7979
"scratch-semantic-release-config": "3.0.0",
80-
"scratch-storage": "4.0.67",
80+
"scratch-storage": "4.0.70",
8181
"scratch-webpack-configuration": "3.0.0",
8282
"semantic-release": "19.0.5",
8383
"tap": "16.3.10",

packages/scratch-svg-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"json": "9.0.6",
6262
"mkdirp": "2.1.6",
6363
"rimraf": "3.0.2",
64-
"scratch-render-fonts": "1.0.169",
64+
"scratch-render-fonts": "1.0.170",
6565
"scratch-semantic-release-config": "3.0.0",
6666
"scratch-webpack-configuration": "3.0.0",
6767
"semantic-release": "19.0.5",

packages/scratch-vm/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
"immutable": "3.8.2",
6565
"jszip": "3.10.1",
6666
"minilog": "3.1.0",
67-
"scratch-audio": "2.0.85",
67+
"scratch-audio": "2.0.86",
6868
"scratch-parser": "6.0.0",
6969
"scratch-sb1-converter": "2.0.76",
70-
"scratch-storage": "4.0.67",
70+
"scratch-storage": "4.0.70",
7171
"scratch-translate-extension-languages": "1.0.7",
7272
"text-encoding": "0.7.0",
7373
"uuid": "8.3.2",
@@ -93,8 +93,8 @@
9393
"json": "^9.0.4",
9494
"pngjs": "3.4.0",
9595
"scratch-blocks": "2.0.0-spork.4",
96-
"scratch-l10n": "5.0.151",
97-
"scratch-render-fonts": "1.0.169",
96+
"scratch-l10n": "5.0.152",
97+
"scratch-render-fonts": "1.0.170",
9898
"scratch-semantic-release-config": "3.0.0",
9999
"scratch-webpack-configuration": "3.0.0",
100100
"script-loader": "0.7.2",

0 commit comments

Comments
 (0)