flexie
flexie copied to clipboard
TypeError: Cannot call method 'updateModel' of undefined
I'm using Flexie on a wordpress theme that uses Disqus for comments. The flexbox layout works fine, except on pages where Disqus (which adds comments after page load via JS) would cause the content column to grow longer -- instead of expanding to accomodate the new content, it just overflows out of the box.
I was able to find a JS trigger for when Disqus finishes drawing, and am using it to call Flexie.updateInstance() like so:
function disqus_config() {
this.callbacks.afterRender = [function() {
alert('hello');
Flexie.updateInstance();
}];
}
The alert triggers fine, but the Flexie command throws the following error: TypeError: Cannot call method 'updateModel' of undefined
Any ideas what I'm doing wrong?
Hm, it sounds like it's trying to call updateInstance on an invalid object. Does the function fire before stylesheets or Flexie itself is loaded?
I can suppress the error, but I don't know if that will help update a Flexie instance it can't find.