Skip to content

Conversation

@mkszepp
Copy link
Contributor

@mkszepp mkszepp commented Aug 6, 2025

fix #10096

While using isEmpty and @ember/utils with schema-record i was running into error Error: No field named unknownProperty on user.

To resolve this issue we need to add unknownProperty and size to IgnoredGlobalFields

import { Checkout, Commit, Context, Destroy } from './symbols.ts';

const IgnoredGlobalFields = new Set<string>(['length', 'nodeType', 'then', 'setInterval', 'document', STRUCTURED]);
const IgnoredGlobalFields = new Set<string>(['length', 'nodeType', 'then', 'setInterval', 'document', 'unknownProperty', 'size', STRUCTURED]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size is a pretty odd one to need, what's the story there? 'length' is here because its what ember uses for isEmpty and JS uses to determine if something is ArrayLike, I'm not familiar with anything using size

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after adding unknownProperty to ignore list, i was running into size error... for this reason i have also added... after both, app works fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing a SchemaRecord to ember isEmpty brings Error: No field named unknownProperty on user

2 participants