htp411 opened a new issue, #21273:
URL: https://github.com/apache/echarts/issues/21273

   ### Version
   
   5.4.1
   
   ### Link to Minimal Reproduction
   
   https://codesandbox.io/p/sandbox/5gzlw7
   
   ### Steps to Reproduce
   
   1. 自定义Map
   `
   function Map() {
   }
   `
   
   2. 第一步创建的Map对象能够通过 typeof Map === 'function' 的验证
   
   <img width="3586" height="1970" alt="Image" 
src="https://github.com/user-attachments/assets/24e569b9-240d-4bd8-a1d2-b876aac14ec9";
 />
   
   ### Current Behavior
   
   使用更为严格的方式判断当前作用域的Map是不是原生的Map
   `
   const isNativeMap = () => typeof Map === 'function' && 
Map.toString().replaceAll(' ', '').replaceAll('\n', '') === 
'functionMap(){[nativecode]}';
   `
   
   ### Expected Behavior
   
   在全局引入Echarts的情况下,只有当前作用域的Map是原生的Map时,才用 new Map创建实例,其余情况还是用Echarts自带的
   
   ### Environment
   
   ```markdown
   - OS: Mac OS
   - Browser: Chrome
   - Framework:
   ```
   
   ### Any additional comments?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to