Skip to content

Commit d182c1d

Browse files
committed
Remove use of 'const' in js to allow plugin to be 'browserify'ed (cordova --browserify). Being part of ES6 and not supported by all browser, this fails to parse with some libraries; in the case of cordova's browserify process an error is generated:
SyntaxError: Unexpected token (2476:6) (while aliasify was processing <project>/plugins/plugin.google.maps/www/googlemaps-cdv-plugin.js) while parsing file: <project>/plugins/plugin.google.maps/www/googlemaps-cdv-plugin.js This error comes from the acorn library (dependency of the aliasify module): node_modules/cordova/node_modules/cordova-lib/node_modules/aliasify/node_modules/browserify-transform-tools/node_modules/falafel/node_modules/acorn
1 parent 0693eee commit d182c1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

www/googlemaps-cdv-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2474,7 +2474,7 @@ document.addEventListener("deviceready", function() {
24742474
plugin.google.maps.Map.isAvailable();
24752475
});
24762476

2477-
const HTML_COLORS = {
2477+
var HTML_COLORS = {
24782478
"alideblue" : "#f0f8ff",
24792479
"antiquewhite" : "#faebd7",
24802480
"aqua" : "#00ffff",

0 commit comments

Comments
 (0)