Created
March 30, 2023 21:00
-
-
Save BoDonkey/21cc930b3f657326558247e1c6ab45f1 to your computer and use it in GitHub Desktop.
Adds testing for a forbidden schema name of "type"- code gets inserted after line 181 of `/piece-type/index.js`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const badFieldName = Object.keys(self.fields).indexOf('type') !== -1; | |
if (badFieldName) { | |
throw new Error('@apostrophecms/piece-type field property name cannot be "type"'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment