Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct Component
available_props = Set{Symbol}(props)
wildcard_regex::Union{Nothing, Regex} = nothing
if !isempty(wildcard_props)
wildcard_regex = Regex(join(string.(wildcard_props), "|"))
wildcard_regex = Regex(join(wildcard_props, "|"))
end
component = new(name, type, namespace, Dict{Symbol, Any}(), available_props, wildcard_regex)
for (prop, value) in kwargs
Expand Down
8 changes: 4 additions & 4 deletions src/registry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ struct Resource
async::Symbol # :none, :eager, :lazy May be we should use enum
function Resource(;relative_package_path, dev_package_path = nothing, external_url = nothing, type = :js, dynamic = nothing, async=nothing)
(!isnothing(dynamic) && !isnothing(async)) && throw(ArgumentError("Can't have both 'dynamic' and 'async'"))
!in(type, [:js, :css]) && throw(ArgumentError("type must be `:js` or `:css`"))
(type !== :js && type !== :css) && throw(ArgumentError("type must be `:js` or `:css`"))
async_symbol = :none
if !isnothing(dynamic)
dynamic == true && (async_symbol = :lazy)
Expand All @@ -17,7 +17,7 @@ struct Resource
end
end

_path_to_vector(s::Nothing) = nothing
_path_to_vector(::Nothing) = nothing
_path_to_vector(s::String) = [s]
_path_to_vector(s::Vector{String}) = s

Expand Down Expand Up @@ -49,8 +49,8 @@ mutable struct ResourcesRegistry
end

get_dash_dependencies(registry::ResourcesRegistry, prop_check::Bool) = prop_check ?
registry.dash_dependency[:dev] :
registry.dash_dependency[:prod]
Comment on lines -52 to -53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off the current master

image

than off this branch

image

Nice!


@sjkelly what about the other patched lines above? Did you use JET to figure out which lines to patch, or are the other patched line just code cleanups?

something(registry.dash_dependency)[:dev] :
something(registry.dash_dependency)[:prod]

get_componens_pkgs(registry::ResourcesRegistry) = values(registry.components)
get_dash_renderer_pkg(registry::ResourcesRegistry) = registry.dash_renderer
Expand Down