komposable / komponent

An opinionated way of organizing front-end code in Ruby on Rails, based on components

Home Page:http://komponent.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

throw an exception when false or nil is passed into a component property

MittchoBaroco opened this issue · comments

Expected Behavior

When passing a false or nil it should not crash

Actual Behavior

throwing a NameError: undefined local variable or method options' for`

Steps to Reproduce the Problem

passing a false or nil on any value of a component like this <%= c "test", value: false %>

Context

I have a component that's taking in a boolean and display a check mark or a cross depending if it's a true or nil

Specifications

Ruby version: 2.5.0
Rails version: 5.2.0.rc1
Komponent version: 1.1.1
Platform: Mac OS 10.13.2

Hello @MittchoBaroco,

I think this issue is resolved by 0a2de8c on master branch.

Yes, thank you, to bad I wanted to try to solve it 😂