Add this to code for IE browser support in your javascript :
(将此添加到您的javascript中的IE浏览器支持代码中:)
if (!Object.entries)
Object.entries = function( obj ){
var ownProps = Object.keys( obj ),
i = ownProps.length,
resArray = new Array(i); // preallocate the Array
while (i--)
resArray[i] = [ownProps[i], obj[ownProps[i]]];
return resArray;
};
For Chrome not required due to polyfill default avaialble.
(对于Chrome,由于polyfill默认可用,因此不需要。)
To check the map is null or not :
(要检查地图是否为空:)
if(Object.entries(mapObj).length > 0){}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…