Skip to content

Commit cdb5178

Browse files
committed
fix loading error about CCSE init
1 parent 82f2273 commit cdb5178

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2042.6] - 2021-09-15
10+
### Fixed
11+
- Loading error about CCSE init
12+
913
## [2042.5] - 2021-09-15
1014
### Added
1115
- Colors!

RELEASE.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
## [2042.5] - 2021-09-15
2-
### Added
3-
- Colors!
4-
5-
### Changed
6-
- Efficiency: Sort buildings only if the order has changed
1+
## [2042.6] - 2021-09-15
2+
### Fixed
3+
- Loading error about CCSE init

main.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ let BestDealHelper = {
131131

132132
const half = Math.floor(values.length / 2);
133133

134-
if (values.length % 2) {
135-
return values[half];
136-
}
134+
if (values.length % 2) return values[half];
137135

138136
return (values[half - 1] + values[half]) / 2.0;
139137
},
@@ -218,8 +216,8 @@ if (!BestDealHelper.isLoaded) {
218216
if (CCSE && CCSE.isLoaded) {
219217
BestDealHelper.register();
220218
} else {
221-
if (!CCSE) { // noinspection JSUnusedLocalSymbols
222-
let CCSE = {};
219+
if (!CCSE) { // noinspection ES6ConvertVarToLetConst
220+
var CCSE = {}; // use var here, or it may cause loading error
223221
}
224222
if (!CCSE.postLoadHooks) CCSE.postLoadHooks = [];
225223
CCSE.postLoadHooks.push(BestDealHelper.register);

0 commit comments

Comments
 (0)