showFooter IE8 - Object expected error
See original GitHub issueUsing IE8 and setting showFooter = true;
cause a javascript error.
Line 144 on:
var calculateObjectValue = function (self, name, args, defaultValue) {
var func = name;
if (typeof name === 'string') {
// support obj.func1.func2
var names = name.split('.');
if (names.length > 1) {
func = window;
$.each(names, function (i, f) {
func = func[f];
});
} else {
func = window[name];
}
}
if (typeof func === 'object') {
return func;
}
// ERROR
if (typeof func === 'function') {
// ERROR HERE
return func.apply(self, args);
}
if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
return sprintf.apply(this, [name].concat(args));
}
return defaultValue;
};
This happends because apply(); function expects second parameter to be an array but undefined is given.
I solved this issue adding an extra control to if statement:
if (typeof func === 'function' && args !== undefined) {
return func.apply(self, args);
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
"Object expected" error using jQuery only in IE8 - Stack Overflow
The problem is that you haven't added jQuery into your code at all. Add the following inside the <head> tag: <script type="text/javascript" ...
Read more >What is "Object Expected" error in Internet Explorer?
IE gives an error message "Object Expected" because it calls the function remoteFunction() prematurely. It calls before loading the file remote. js, which ......
Read more >UI for ASP.NET MVC Q1 2016 - Telerik
Popup widget re-positions incorrectly when anchor is near the page bottom; IE8: JS error when kendo is loaded; firstDay should be Sunday in...
Read more >Issues Addressed in SAS 9.4 (TS1M0)
Valuation fails with "ERROR: BY variables are not properly sorted on data set RD_STAGE.ISSUE_ASSET_MART. " 64-bit Enabled AIX, 64-bit Enabled ...
Read more >script error object expected - Microsoft Community
I run windows 8.1 and quite often when opening up IE 11 I get a script error... usually object expected...I went to tools,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! Fixed this in develop branch
@wenzhixin just tested, this works too.