Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,11 @@ export default class FeatureService {

const attributionController = this._map._controls.find(c => '_attribHTML' in c)

if (!attributionController) return
if (!attributionController || !this._esriServiceOptions.setAttributionFromService) return

const customAttribution = attributionController.options.customAttribution

if (typeof customAttribution === 'string') {
if (typeof customAttribution === 'string' && !customAttribution.includes(POWERED_BY_ESRI_ATTRIBUTION_STRING)) {
attributionController.options.customAttribution = `${customAttribution} | ${POWERED_BY_ESRI_ATTRIBUTION_STRING}`
} else if (customAttribution === undefined) {
attributionController.options.customAttribution = POWERED_BY_ESRI_ATTRIBUTION_STRING
Expand Down