diff --git a/nix-js/runtime-ts/src/helpers.ts b/nix-js/runtime-ts/src/helpers.ts index 9fc9ba0..623ea7c 100644 --- a/nix-js/runtime-ts/src/helpers.ts +++ b/nix-js/runtime-ts/src/helpers.ts @@ -115,12 +115,7 @@ export const select = (obj: NixValue, attrpath: NixValue[]): NixValue => { if (!(key in attrs)) { throw new Error(`Attribute '${key}' not found`); } - const cur = force(attrs[forceString(attr)]); - if (!isAttrs(cur)) { - // throw new Error(`Attribute '${forced_key}' not found`); - // FIXME: error - throw new Error(`Attribute not found`); - } + const cur = forceAttrs(attrs[forceString(attr)]); attrs = cur; }