Skip to content

ulid implementation being used doesn't support web workers where window doesn't exist #499

Closed
@flothjl

Description

@flothjl

ulid monotonicFactory is being used by EventLogLevel https://github.com/TBD54566975/dwn-sdk-js/blob/0e3bc291e532b2e7afb1bbc1e17e901508dd1f76/src/event-log/event-log-level.ts#L34. The ulid implementation being used only looks for window when determining whether or not it's in the browser https://github.com/ulid/javascript/blob/a5831206a11636c94d4657b9e1a1354c529ee4e9/lib/index.ts#L118-L121. This causes issues in the case of a web worker where window doesn't exist.

Note - this has been brought up a few times in this ULID implementation's repo (example).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions