Extra condition so it doesn't crash in IE8
Merge pull request #4880 from absolunet/master

Extra condition so it doesn't crash in IE8