aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/WebBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r--src/client/views/nodes/WebBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx
index 73afd66f6..725c5bab4 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -14,7 +14,7 @@ import { InkTool } from '../../../fields/InkField';
import { List } from '../../../fields/List';
import { RefField } from '../../../fields/RefField';
import { listSpec } from '../../../fields/Schema';
-import { Cast, NumCast, StrCast, WebCast } from '../../../fields/Types';
+import { Cast, NumCast, StrCast, toList, WebCast } from '../../../fields/Types';
import { ImageField, WebField } from '../../../fields/URLField';
import { TraceMobx } from '../../../fields/util';
import { emptyFunction, stringHash } from '../../../Utils';
@@ -895,7 +895,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps>() implem
addDocumentWrapper = (docs: Doc | Doc[], annotationKey?: string) => {
this._url &&
- (docs instanceof Doc ? [docs] : docs).forEach(doc => {
+ toList(docs).forEach(doc => {
doc.config_data = new WebField(this._url);
});
return this.addDocument(docs, annotationKey);