Skip to content

Bug: fitting input as object with a key with the value 'false' - is lost - kept as undefined #29

@royrothman

Description

@royrothman

Consider this:

bagpipes:
   some-flow:
    - some-fitting:
         key: false

When I play the pipe - I get the false of the ctx.input as undefined 😢

bug reproduction:

const bagpipes = require('bagpipes');
const pipes = bagpipes.create({ 'foo' : [ { emit: { bar: false } } ] } );
pipes.play( pipes.getPipe( 'foo' ) , ctx = {} );

if( ctx.output.bar !== false) throw new Error('oups. expected false, but got something else');

Thanks

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