Skip to content

Add unknownProperty and size to IgnoredGlobalFields list #10108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

@@ -28,7 +28,7 @@ import { peekManagedObject } from './fields/managed-object.ts';
import type { SchemaService } from './schema.ts';
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
Status: needs triage
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