Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Rename function isEmpty to checkIfEmpty#329

Open
jlouche wants to merge 1 commit intoansman:masterfrom
Kwixeo:master
Open

Rename function isEmpty to checkIfEmpty#329
jlouche wants to merge 1 commit intoansman:masterfrom
Kwixeo:master

Conversation

@jlouche
Copy link

@jlouche jlouche commented Apr 26, 2020

I just rename the function isEmpty to checkIfEmpty.

If validate.js is not used directly in a project but via a library (which it uses validate.js), the following error occurs:

UnCaught TypeError: unable to assign read-only property 'isEmpty' of function '(attributes, constraints, options) {
options = v.extend ({}, v.options, options);

The problem seems to be that the isEmpty function is already defined by default as a prototype.

Rename function isEmpty to checkIfEmpty to avoid a javascript error after build.

The error :
Uncaught TypeError: Cannot assign to read only property 'isEmpty' of function 'function(attributes, constraints, options) {...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant