DEV Community

Discussion on: Do you leave jokes in your code? If so, please share!

Collapse
 
janpauldahlke profile image
jan paul • Edited
//this should work, but...
//the night is dark and full of errors 
  onCheckBoxChange = (val: string ) => (_e: any) => {

    if (typeof this.props.updatePermission === 'function' && this.props.officerId && this.props.officerId >= 0) {

      this.props.updatePermission(this.props.officerId, {
        ...{ isValidAsPast : this.props.isValidAsPast, isValidAsUpcoming: this.props.isValidAsUpcoming},
        [val] : !this.props[val] } as PermissionPartial 
        ); 
    }
  }
Collapse
 
ahmedmusallam profile image
Ahmed Musallam

Hahahaha, this great! Might steal that from you ;)

Collapse
 
codemouse92 profile image
Jason C. McDonald

"The night is dark and full of errors."

How is this not a meme?