Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Commit

Permalink
fix(loader): replace remove() with removeChild() to delete an existing
Browse files Browse the repository at this point in the history
script tag
  • Loading branch information
jabas06 committed Oct 16, 2015
1 parent 7f06702 commit 86aa0fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coffee/providers/map-loader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ angular.module('uiGmapgoogle-maps.providers')
query = _.map _.omit(options, omitOptions), (v, k) ->
k + '=' + v

document.getElementById(scriptId).remove() if scriptId
if scriptId
scriptElem = document.getElementById(scriptId)
scriptElem.parentNode.removeChild(scriptElem)

query = query.join '&'
script = document.createElement 'script'
script.id = scriptId = "ui_gmap_map_load_#{uuid.generate()}"
Expand Down

0 comments on commit 86aa0fe

Please sign in to comment.