Skip to content

Conversation

VasilisTert
Copy link

The flag disableFreeze is in collection not in this. Now it returns undefined so the object is always cloned.

@AntonNevsgodov
Copy link

Until this PR is merged (never, I guess), this monkeypatch can be a viable solution:

// TypeScript
import LokiJS from 'lokijs';

// Make Resultset.disableFreeze a property with getter that returns Collection.disableFreeze property value.
Object.defineProperty((LokiJS as any).Resultset.prototype, 'disableFreeze', {
  get() {
    return this.collection.disableFreeze;
  },
});

@wilwade
Copy link

wilwade commented Aug 12, 2025

Just hit this bug. Can confirm the PR fixes it.

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.

3 participants