Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): route.view can be empty / nil #960

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

dsully
Copy link
Contributor

@dsully dsully commented Oct 1, 2024

Description

NoiceRouteConfig.view can be empty / nil as the check in M.add() sets it to nil if the view doesn't exist.

---@param route NoiceRouteConfig
---@param pos? number
function M.add(route, pos)
  local ret = {
    filter = route.filter,
    opts = route.opts or {},
    view = route.view and View.get_view(route.view, route.opts) or nil,
  }
  if ret.view == nil then
    ret.opts.skip = true
  end

@dsully dsully changed the title NoiceRouteConfig.view can be empty / nil fix: NoiceRouteConfig.view can be empty / nil Oct 1, 2024
@dsully dsully changed the title fix: NoiceRouteConfig.view can be empty / nil fix(types): NoiceRouteConfig.view can be empty / nil. Oct 1, 2024
@dsully dsully changed the title fix(types): NoiceRouteConfig.view can be empty / nil. fix(main): NoiceRouteConfig.view can be empty / nil. Oct 1, 2024
@dsully dsully changed the title fix(main): NoiceRouteConfig.view can be empty / nil. fix(types): route.view can be empty / nil. Oct 1, 2024
@dsully dsully changed the title fix(types): route.view can be empty / nil. fix(types): route.view can be empty / nil Oct 1, 2024
@folke folke merged commit fab3ab1 into folke:main Oct 2, 2024
3 of 8 checks passed
@folke
Copy link
Owner

folke commented Oct 2, 2024

ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants