Skip to content

Commit

Permalink
rc3 - only import if supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
melissag-ensemble committed Jun 20, 2024
1 parent 7bccbd3 commit 44d2608
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-theme-aio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/gatsby-theme-aio",
"version": "4.11.16-rc2",
"version": "4.11.16-rc3",
"description": "The Adobe I/O theme for building markdown powered sites",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
13 changes: 10 additions & 3 deletions packages/gatsby-theme-aio/src/components/RedoclyAPIBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ const RedoclyAPIBlock = ({
input.spec = withPrefix(src);
}

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
let module;
console.log('~~ 1');
import(requestInterceptorSrc).then((mod) => {
console.log('~~ 2', mod);
});
if(requestInterceptorSrc) {
console.log('~~ 2');
import(requestInterceptorSrc).then((mod) => {
module = mod;
console.log('~~ 3', mod, module);
});
}
console.log('~~ 4');

useEffect(() => {
let script = document.createElement('script')
Expand Down

0 comments on commit 44d2608

Please sign in to comment.