Skip to content

Commit fe8a3f9

Browse files
committed
simplify subplot creation if-statement
1 parent 447abec commit fe8a3f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/plots/geo/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exports.plot = function plotGeo(gd) {
4949
geo = fullLayout[geoId]._subplot;
5050

5151
// If geo is not instantiated, create one!
52-
if(geo === undefined) {
52+
if(!geo) {
5353
geo = new Geo({
5454
id: geoId,
5555
graphDiv: gd,

src/plots/ternary/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports.plot = function plotTernary(gd) {
4141
ternary = fullLayout[ternaryId]._subplot;
4242

4343
// If ternary is not instantiated, create one!
44-
if(ternary === undefined) {
44+
if(!ternary) {
4545
ternary = new Ternary({
4646
id: ternaryId,
4747
graphDiv: gd,

0 commit comments

Comments
 (0)