Add fix for Tooltip warning in Gutenberg
[MAILPOET-2976]
This commit is contained in:
committed by
Veljko V
parent
12a1d041cf
commit
cb2e17af85
@ -23,7 +23,8 @@
|
|||||||
"test": "env NODE_PATH=$NODE_PATH:./assets/js/src mocha --require tests/javascript/babel_register.js tests/javascript/**/*.spec.js",
|
"test": "env NODE_PATH=$NODE_PATH:./assets/js/src mocha --require tests/javascript/babel_register.js tests/javascript/**/*.spec.js",
|
||||||
"check-types": "tsc --noEmit",
|
"check-types": "tsc --noEmit",
|
||||||
"storybook": "start-storybook -s ./ -p 8083",
|
"storybook": "start-storybook -s ./ -p 8083",
|
||||||
"build-storybook": "build-storybook"
|
"build-storybook": "build-storybook",
|
||||||
|
"postinstall": "node packages_postinstall.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.10.2",
|
"@babel/runtime": "^7.10.2",
|
||||||
|
17
packages_postinstall.js
Normal file
17
packages_postinstall.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* This is a temporary fix of a bug in @wordpress/block-editor@4.1.0 package.
|
||||||
|
* It is already fixed and merged in master https://github.com/WordPress/gutenberg/commit/1e43db126e33e13173f9af9113cb9f39f9be7f1f
|
||||||
|
* We can remove this fix after upgrading the package to a version newer than 4.1.0
|
||||||
|
*/
|
||||||
|
const fs = require('fs');
|
||||||
|
const fileToFix = './node_modules/@wordpress/block-editor/build-module/components/button-block-appender/index.js';
|
||||||
|
fs.readFile(fileToFix, 'utf8', (err,data) => {
|
||||||
|
if (err) {
|
||||||
|
return console.log(err);
|
||||||
|
}
|
||||||
|
var result = data.replace(/" ", inserterButton, " "/g, 'inserterButton');
|
||||||
|
|
||||||
|
fs.writeFile(fileToFix, result, 'utf8', (err) => {
|
||||||
|
if (err) return console.log(err);
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user