Skip to content

Commit ecf3e06

Browse files
authored
Merge branch 'plotly:dev' into fix-xss
2 parents c6d45e7 + f27810f commit ecf3e06

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

dash/_validate.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,11 @@ def validate_index(name, checks, index):
392392
def validate_layout_type(value):
393393
if not isinstance(value, (Component, patch_collections_abc("Callable"))):
394394
raise exceptions.NoLayoutException(
395-
"Layout must be a dash component "
396-
"or a function that returns a dash component."
395+
"""
396+
Layout must be a single dash component
397+
or a function that returns a dash component.
398+
Cannot be a tuple (are there any trailing commas?)
399+
"""
397400
)
398401

399402

dash/dash-renderer/src/utils/TreeContainer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export function validateComponent(componentDefinition: any) {
6161
if (type(componentDefinition) === 'Array') {
6262
throw new Error(
6363
'The children property of a component is a list of lists, instead ' +
64-
'of just a list. ' +
65-
'Check the component that has the following contents, ' +
64+
'of just a list. This can sometimes be due to a trailing comma. ' +
65+
'Check the component that has the following contents ' +
6666
'and remove one of the levels of nesting: \n' +
6767
JSON.stringify(componentDefinition, null, 2)
6868
);

0 commit comments

Comments
 (0)