Skip to content

[BUG] findAllotPathsAndValues fails even without %allot fields in createStandardData #27

@hitman298

Description

@hitman298

The findAllotPathsAndValues function in @nillion/[email protected] incorrectly tries to process %allot fields even when they are not present in the data, causing createStandardData to fail with "Cannot convert undefined or null to object" error.

Steps to Reproduce:

  1. Create a collection with plain text fields (no %allot in schema)
  2. Try to store data without any %allot fields
  3. Call createStandardData with plain text data

Expected Behavior:
Data should be stored successfully as plain text

Actual Behavior:
Fails with TypeError: Cannot convert undefined or null to object at findAllotPathsAndValues

Environment:

Test Code:

// This fails even with plain text data
const result = await builder.createStandardData({
  collection: collectionId,
  data: {
    _id: randomUUID(),
    name: 'Plain Text Name', // No %allot fields
    email: '[email protected]' // No %allot fields
  }
});

Additional Notes:

  • Collection creation works perfectly
  • Data reading works perfectly
  • Builder registration works perfectly
  • Only data storage (createStandardData) is affected
  • Affects both single objects and arrays of data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions