Link: SAP. Making. IO/called spartacus – d…
Do not use global objects that are only available in the browser environment, such as Window, Document, Navigator, etc., because they are not available in server-side rendering mode.
Do not access global objects that are available in the browser. For example, do not use the window, document, navigator, and other browser types, because they do not exist on the server.
Look at a Github issue:
Github.com/SAP/spartac…
We need to use the injected document object:
More of Jerry’s original articles can be found in “Wang Zixi” :