Skip to content

$notnil selector doesn't work #13

@borispoehland

Description

@borispoehland

Hey,

The $notnil selector doesn't work, and I know why. In your code you have:

// when prop has no value, we pretent value is $nil to be able to kick off $nil hook later.
  if (isNil(correspondingSourceValue)) {
    correspondingSourceValue = $nil;
  }
  // ...
  if (!isNil(valueVariations[$notnil]) && !isNil(correspondingSourceValue)) {
    matchingVariations = [valueVariations[$notnil], matchingVariations].filter(Boolean).join(" ");
  }

Because you set correspondingSourceValue to $nil, the check !isNil(correspondingSourceValue) does not become true. Instead, you can check with !isNil(source[prop])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions