mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-07 21:26:08 -05:00
Add isnan() function for IE
This commit is contained in:
@@ -1132,7 +1132,7 @@ imageutils.createBrush = function($el, opts, coordmap, expandPixels) {
|
||||
const bounds_data = boundsData();
|
||||
// Check to see if we have valid boundsData
|
||||
for (let val in bounds_data) {
|
||||
if (Number.isNaN(bounds_data[val])) return;
|
||||
if (isnan(bounds_data[val])) return;
|
||||
}
|
||||
|
||||
boundsData(bounds_data);
|
||||
|
||||
@@ -254,6 +254,12 @@ function mapValues(obj, f) {
|
||||
return newObj;
|
||||
}
|
||||
|
||||
// This is does the same as Number.isNaN, but that function unfortunately does
|
||||
// not exist in any version of IE.
|
||||
function isnan(x) {
|
||||
return typeof(x) === 'number' && isNaN(x);
|
||||
}
|
||||
|
||||
// Binary equality function used by the equal function.
|
||||
function _equal(x, y) {
|
||||
if ($.type(x) === "object" && $.type(y) === "object") {
|
||||
|
||||
Reference in New Issue
Block a user