Skip to content

Commit

Permalink
Catch error thrown when you call sizeChanged() on an unloaded model
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@510 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
JohnSmith-LT committed Nov 16, 2012
1 parent b49bf7d commit 6c3e77e
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -778,12 +778,15 @@ function x_updateCss(updatePage) {
}

if (updatePage == true) {
// calls function in current page model which does anything needed on size change
if (x_pageInfo[x_currentPage].type == "text") {
simpleText.sizeChanged(); // errors if you just call text.sizeChanged()
} else {
eval(x_pageInfo[x_currentPage].type).sizeChanged();
try {
// calls function in current page model which does anything needed on size change
if (x_pageInfo[x_currentPage].type == "text") {
simpleText.sizeChanged(); // errors if you just call text.sizeChanged()
} else {
eval(x_pageInfo[x_currentPage].type).sizeChanged();
}
}
catch(e) {} // Catch error thrown when you call sizeChanged() on an unloaded model
}

$(".x_popupDialog").parent().detach();
Expand Down

0 comments on commit 6c3e77e

Please sign in to comment.