File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,12 @@ to_css_size(s::AbstractString) = s
20
20
to_css_size (s:: Real ) = " $(s) px"
21
21
22
22
function showtable (table; dark = false , height = :auto , width = " 100%" )
23
- if ! Tables. istable (typeof (table))
24
- throw (ArgumentError (" Argument is not a table." ))
23
+ if ! Tables. istable (table)
24
+ try
25
+ table = Tables. table (table)
26
+ catch err
27
+ throw (ArgumentError (" Argument is not a table." ))
28
+ end
25
29
end
26
30
27
31
tablelength = Base. IteratorSize (table) == Base. HasLength () ? length (Tables. rows (table)) : nothing
Original file line number Diff line number Diff line change 19
19
]
20
20
@test showtable (nttable) isa WebIO. Scope
21
21
end
22
+ @testset " normal array" begin
23
+ array = rand (10 , 10 )
24
+ @test showtable (array) isa WebIO. Scope
25
+ end
You can’t perform that action at this time.
0 commit comments