From 41eca014e12821248d13de999eff0306baeaa1cc Mon Sep 17 00:00:00 2001 From: denisname Date: Wed, 1 Aug 2018 22:53:31 +0200 Subject: [PATCH] `document.body` is possibly 'null' in TypeScript@next (#27782) --- types/bootstrap/bootstrap-tests.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index f0bbbea7f2..9a80afc654 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -1,3 +1,5 @@ +declare let aHtmlElement: HTMLElement; + // -------------------------------------------------------------------------------------- // Alert // -------------------------------------------------------------------------------------- @@ -78,7 +80,7 @@ $("#collapse").collapse({ }); $("#collapse").collapse({ - parent: document.body, + parent: aHtmlElement, }); $("#collapse").collapse({ @@ -122,11 +124,11 @@ $("#dropdown").dropdown({ }); $("#dropdown").dropdown({ - boundary: document.body, + boundary: aHtmlElement, }); $("#dropdown").dropdown({ - reference: document.body, + reference: aHtmlElement, }); // -------------------------------------------------------------------------------------- @@ -340,5 +342,5 @@ $("#tooltip").tooltip({ }); $("#tooltip").tooltip({ - boundary: document.body, + boundary: aHtmlElement, });