Skip to content

Max stack call error in prod mode with asserts (v5, v4) #8710

Closed
@lifeart

Description

@lifeart

At the moment, if debug data is not stripped from prod build, we have recursion error.

Given: Prod build, assert function is not stripped.

  1. Trying to access any key (id, for example) on just created model.

  2. This code part is executed:

    return peekCache(this).getAttr(recordIdentifierFor(this), key);

  3. And here we calling toString on record:

    assert(`${String(record)} is not a record instantiated by @ember-data/store`, RecordCache.has(record));

  4. And we going here:

    return `<model::${this.constructor.modelName}:${this.id}>`;

Where we access this.id and here is GOTO: 1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions