JSFiddle - React, Tailwind, and code Playground
HTML
<div>js broken</div>
CSS
div{height:50px;width:150px;padding:20px;background:yellow;}
JavaScript
/*
http://stackoverflow.com/questions/29154959/understanding-javascript-object-size-with-jquery-isemptyobject
*/
var tmp;
var objErr = new Object();
objErr['test'] = 'bob';
if ($.isEmptyObject(objErr) ){
$('div').hide();
}else{
tmp = Object.size(objErr);
$('div').hide(); //if not work, js is broken
}
if (tmp > 1){
$('div').hide();
alert(tmp);
}else{
$('div').hide();
}