<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Elevation Profile 3.35 destroy issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/elevation-profile-3-35-destroy-issue/m-p/1036597#M72059</link>
    <description>&lt;P&gt;Hey guys!&lt;/P&gt;&lt;P&gt;I've encountered a problem that Elevation Profile widget version 3.35 is being destroyed incorrectly. I've tested it in different situations (even in the &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/widget_elevationprofile_createfeature.html" target="_blank" rel="noopener"&gt;sample for this widget&lt;/A&gt;), and in all cases during the process of destroying it throws this type error.&lt;/P&gt;&lt;PRE&gt;Uncaught TypeError: Cannot set property 'innerHTML' of null.    svg.js:formatted:278&amp;nbsp;&lt;BR /&gt;at Object.destroy (svg.js:formatted:278)&lt;BR /&gt;at Object.m ((index):201)&lt;BR /&gt;at Object.destroy (svg.js:formatted:1282)&lt;BR /&gt;at Object.destroy (Chart.js:5)&lt;BR /&gt;at Object.destroy (ProfileChart.js:31)&lt;BR /&gt;at Object.advice ((index):122)&lt;BR /&gt;at Object.e [as destroy] ((index):121)&lt;BR /&gt;at Object.destroy (ElevationProfile.js:22)&lt;BR /&gt;at Object.advice ((index):122)&lt;BR /&gt;at Object.e [as destroy] ((index):121)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And here is the source code that throws an error directly (I've commented the desired line).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;t.Surface = w("dojox.gfx.shape.Surface", null, {
                    constructor: function() {
                        this._parent = this.rawNode = null;
                        this._nodes = [];
                        this._events = []
                    },
                    destroy: function() {
                        p.forEach(this._nodes, n.destroy);
                        this._nodes = [];
                        p.forEach(this._events, function(b) {
                            b &amp;amp;&amp;amp; b.remove()
                        });
                        this._events = [];
                        this.rawNode = null;
                        if (u("ie"))
                            for (; this._parent.lastChild; )
                                n.destroy(this._parent.lastChild);
                        else
                            this._parent.innerHTML = ""; // it crashes here
                        this._parent = null
                    },
                    getEventSource: function() {
                        return this.rawNode
                    },
                    _getRealMatrix: function() {
                        return null
                    },
                    isLoaded: !0,
                    onLoad: function(b) {},
                    whenLoaded: function(b, k) {
                        var l = x.hitch(b, k);
                        if (this.isLoaded)
                            l(this);
                        else
                            f.once(this, "load", function(e) {
                                l(e)
                            })
                    }
                });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Has anyone else encountered the problem?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 13:44:20 GMT</pubDate>
    <dc:creator>PlatonYasev</dc:creator>
    <dc:date>2021-03-15T13:44:20Z</dc:date>
    <item>
      <title>Elevation Profile 3.35 destroy issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/elevation-profile-3-35-destroy-issue/m-p/1036597#M72059</link>
      <description>&lt;P&gt;Hey guys!&lt;/P&gt;&lt;P&gt;I've encountered a problem that Elevation Profile widget version 3.35 is being destroyed incorrectly. I've tested it in different situations (even in the &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/widget_elevationprofile_createfeature.html" target="_blank" rel="noopener"&gt;sample for this widget&lt;/A&gt;), and in all cases during the process of destroying it throws this type error.&lt;/P&gt;&lt;PRE&gt;Uncaught TypeError: Cannot set property 'innerHTML' of null.    svg.js:formatted:278&amp;nbsp;&lt;BR /&gt;at Object.destroy (svg.js:formatted:278)&lt;BR /&gt;at Object.m ((index):201)&lt;BR /&gt;at Object.destroy (svg.js:formatted:1282)&lt;BR /&gt;at Object.destroy (Chart.js:5)&lt;BR /&gt;at Object.destroy (ProfileChart.js:31)&lt;BR /&gt;at Object.advice ((index):122)&lt;BR /&gt;at Object.e [as destroy] ((index):121)&lt;BR /&gt;at Object.destroy (ElevationProfile.js:22)&lt;BR /&gt;at Object.advice ((index):122)&lt;BR /&gt;at Object.e [as destroy] ((index):121)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And here is the source code that throws an error directly (I've commented the desired line).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;t.Surface = w("dojox.gfx.shape.Surface", null, {
                    constructor: function() {
                        this._parent = this.rawNode = null;
                        this._nodes = [];
                        this._events = []
                    },
                    destroy: function() {
                        p.forEach(this._nodes, n.destroy);
                        this._nodes = [];
                        p.forEach(this._events, function(b) {
                            b &amp;amp;&amp;amp; b.remove()
                        });
                        this._events = [];
                        this.rawNode = null;
                        if (u("ie"))
                            for (; this._parent.lastChild; )
                                n.destroy(this._parent.lastChild);
                        else
                            this._parent.innerHTML = ""; // it crashes here
                        this._parent = null
                    },
                    getEventSource: function() {
                        return this.rawNode
                    },
                    _getRealMatrix: function() {
                        return null
                    },
                    isLoaded: !0,
                    onLoad: function(b) {},
                    whenLoaded: function(b, k) {
                        var l = x.hitch(b, k);
                        if (this.isLoaded)
                            l(this);
                        else
                            f.once(this, "load", function(e) {
                                l(e)
                            })
                    }
                });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Has anyone else encountered the problem?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 13:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/elevation-profile-3-35-destroy-issue/m-p/1036597#M72059</guid>
      <dc:creator>PlatonYasev</dc:creator>
      <dc:date>2021-03-15T13:44:20Z</dc:date>
    </item>
  </channel>
</rss>

