Comments (3)
@oskari
null
check was added in the latest release
https://github.com/AddSearch/js-client-library/releases/tag/v0.8.6
Could you check again please?
from js-client-library.
I'm sorry, my initial description was written a bit too hastily. Null check isn't sufficient as the whole document
object is not available.
ERROR UNKNOWN
There was an error compiling the html.js component for the development server.
See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html ReferenceError: document is not defined
10 |
11 | const getCookie = function(cookieName) {
> 12 | if (!document) {
| ^
13 | return;
14 | }
15 | let name = cookieName + "=";
WebpackError: ReferenceError: document is not defined
- cookie.js:12
[www.mehilainen.fi]/[addsearch-js-client]/src/cookie.js:12:1
- index.js:20
[www.mehilainen.fi]/[addsearch-js-client]/src/index.js:20:1
I'd guess a better way around it would be typeof
check, as seems to be the case in multiple js cookie libraries:
if (typeof document === 'undefined') {
return
}
https://github.com/js-cookie/js-cookie/blob/a427812597527fd82f9747fe075c2f65b93c3112/src/api.mjs#L6
from js-client-library.
Thank you for the PR @oskari
I published a new fixed version 0.8.7
from js-client-library.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-client-library.