-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
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:
- Create a collection with plain text fields (no %allot in schema)
- Try to store data without any %allot fields
- 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:
- Library: @nillion/[email protected]
- Network: Testnet
- Node.js: Latest
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
Labels
No labels