Skip to content

Commit

Permalink
fixed simple copy
Browse files Browse the repository at this point in the history
New bug introduced in Esri#109 by moving the cacheItem method.
  • Loading branch information
ecaldwell committed Dec 1, 2015
1 parent a011a15 commit a22fac9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,13 +1066,16 @@ require([
if (isSupported(type)) {
// Get the full item description and data from the source.
portal.itemDescription(id).done(function(description) {
portal.cacheItem(description);
switch (type) {
case "Feature Service":

// Upgrade the service url to https to prevent mixed content errors.
description.url = portalUtil.upgradeUrl(description.url);

portal.cacheItem(description);
// Also update the cached url.
portal.items[portal.items.length - 1].description.url = description.url;

portal.serviceDescription(description.url).done(function(serviceDescription) {
var item = jquery.grep(portal.items, function(item) {
return (item.id === id);
Expand Down

0 comments on commit a22fac9

Please sign in to comment.