Răsfoiți Sursa

Simplified the if.

Kamil Piechaczek 6 ani în urmă
părinte
comite
23cff863c8
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      packages/ckeditor5-basic-styles/src/bold/boldediting.js

+ 1 - 1
packages/ckeditor5-basic-styles/src/bold/boldediting.js

@@ -47,7 +47,7 @@ export default class BoldEditing extends Plugin {
 					}
 
 					// Value of the `font-weight` attribute can be defined as a string or a number.
-					if ( fontWeight == 'bold' || /\d+/.test( fontWeight ) && Number( fontWeight ) >= 600 ) {
+					if ( fontWeight == 'bold' || Number( fontWeight ) >= 600 ) {
 						return {
 							name: true,
 							styles: [ 'font-weight' ]