FIX typings

This commit is contained in:
Norbert de Langen 2020-03-04 19:53:05 +01:00
parent f3600ae551
commit 091134831d
No known key found for this signature in database
GPG Key ID: 976651DA156C2825

View File

@ -1,4 +1,4 @@
import { window, document } from 'global';
import { window, document, location } from 'global';
import Channel, { ChannelEvent, ChannelHandler } from '@storybook/channels';
import { logger } from '@storybook/client-logger';
@ -107,9 +107,11 @@ export class PostmsgTransport {
private getFrames(target?: string): Window[] {
if (this.config.page === 'manager') {
const list: HTMLIFrameElement[] = [
const nodes: HTMLIFrameElement[] = [
...document.querySelectorAll('#storybook-preview-wrapper iframe'),
]
];
const list = nodes
.filter(e => {
try {
return !!e.contentWindow && e.dataset.isStorybook !== undefined && e.id === target;