File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ module.exports = View.extend({
3131 } ,
3232
3333 render : function ( ) {
34- var attributions = _ . compact ( this . map . get ( 'attribution' ) ) . join ( ', ' ) ;
34+ var emptyStringRegExp = new RegExp ( / [ A - z ] / g) ;
35+ var attributionsSet = [ ...new Set ( this . map . get ( 'attribution' ) ) ] ;
36+ var attributions = _ . compact ( attributionsSet )
37+ . filter ( attribution => emptyStringRegExp . test ( attribution ) )
38+ . join ( ', ' ) ;
3539 var isGMaps = this . map . get ( 'provider' ) !== 'leaflet' ;
3640 this . $el . html (
3741 template ( {
@@ -46,7 +50,7 @@ module.exports = View.extend({
4650
4751 _initBinds : function ( ) {
4852 this . model . bind ( 'change:visible' , function ( mdl , isVisible ) {
49- this [ isVisible ? '_showAttributions' : '_hideAttributions' ] ( ) ;
53+ this [ isVisible ? '_showAttributions' : '_hideAttributions' ] ( ) ;
5054 } , this ) ;
5155 this . map . bind ( 'change:attribution' , this . render , this ) ;
5256 this . add_related_model ( this . map ) ;
You can’t perform that action at this time.
0 commit comments