Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7c8be7

Browse files
committed
fix geojson layers with {} sources in nw.js
1 parent 2c83631 commit b7c8be7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plots/mapbox/layers.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ proto.dispose = function dispose() {
112112
function isVisible(opts) {
113113
var source = opts.source;
114114

115+
// For some weird reason Lib.isPlainObject fails
116+
// to detect `source` as a plain object in nw.js 0.12.
117+
115118
return (
116-
Lib.isPlainObject(source) ||
119+
typeof source === 'object' ||
117120
(typeof source === 'string' && source.length > 0)
118121
);
119122
}

0 commit comments

Comments
 (0)