Low version browsers report an error Object.fromEntries is not a function

ckeditor Google 68 error Object.fromEntries is not a function

Solution 1:

npm i polyfill-object.fromentries

Introduce in the entry file: import 'polyfill-object.fromentries'

Solution 2:

Add the following code to build\cdeditor.js:

Object.fromEntries = function fromEntries (iterable) {
    
    
    return [...iterable].reduce((obj, [key, val]) => {
    
    
        obj[key] = val;
        return obj;
    }, {
    
    });
};

insert image description here

Guess you like

Origin blog.csdn.net/weixin_43485503/article/details/130268355