mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
Rename Schema.isNormalization
to Schema.hasValidators
This commit is contained in:
@@ -50,7 +50,7 @@ class Schema extends new Record(DEFAULTS) {
|
||||
* @return {Boolean} isNormalization
|
||||
*/
|
||||
|
||||
get isNormalization() {
|
||||
get hasValidators() {
|
||||
const { rules } = this
|
||||
return rules.some(rule => rule.validate)
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ export function normalizeWith(transform, schema, prevDocument) {
|
||||
const { state } = transform
|
||||
const { document } = state
|
||||
|
||||
if (!schema.isNormalization) {
|
||||
if (!schema.hasValidators) {
|
||||
// Schema has no normalization rules
|
||||
return transform
|
||||
}
|
||||
|
Reference in New Issue
Block a user