Skip to content

Commit ea86419

Browse files
committed
Avoid the unnecessary use of the logical-assignment-operators
Close #39
1 parent fdcf1fc commit ea86419

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

.babelrc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"presets": ["@babel/preset-env"],
33
"plugins": [
4-
["@babel/plugin-transform-regenerator", {
5-
"asyncGenerators": true,
6-
"generators": true,
7-
"async": true
8-
}],
9-
"@babel/plugin-proposal-logical-assignment-operators"
4+
[
5+
"@babel/plugin-transform-regenerator",
6+
{
7+
"asyncGenerators": true,
8+
"generators": true,
9+
"async": true
10+
}
11+
]
1012
]
1113
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Add the ability to color point connections by their segment via `pointConnectionColorBy: 'segment'`
66
- Fix an issue with normalizing RGB(A) values
7+
- Avoid the unnecessary use of the logical-assignment-operators (#39)
78

89
## v0.16.2
910

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
},
4949
"devDependencies": {
5050
"@babel/core": "^7.13.8",
51-
"@babel/plugin-proposal-logical-assignment-operators": "^7.13.8",
5251
"@babel/plugin-transform-regenerator": "^7.12.13",
5352
"@babel/polyfill": "^7.12.1",
5453
"@babel/preset-env": "7.13.9",

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ const createScatterplot = (initialProperties = {}) => {
229229

230230
checkReglExtensions(regl);
231231

232-
regl ||= createRegl(canvas);
232+
// Same as regl ||= createRegl(canvas) but avoids having to rely on
233+
// https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators
234+
// eslint-disable-next-line no-unused-expressions
235+
regl || (regl = createRegl(canvas));
233236

234237
backgroundColor = toRgba(backgroundColor, true);
235238
lassoColor = toRgba(lassoColor, true);

0 commit comments

Comments
 (0)