Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on an InspireJS slidedeck: Error [TypeError]: Cannot read properties of null (reading 'style') #352

Open
matirosero opened this issue Nov 19, 2024 · 1 comment

Comments

@matirosero
Copy link

Trying to download this slidedeck that I made: https://torno1.matirosero.art, but it works with https://inspirejs.org

Getting the following error:

Error [TypeError]: Cannot read properties of null (reading 'style') at evaluate (evaluate at Inspire.configure (file:///PATH/decktape/node_modules/decktape/plugins/inspire.js:19:22), <anonymous>:0:38) at #evaluate (file:///PATH/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:383:19) at async ExecutionContext.evaluate (file:///PATH/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:270:16) at async IsolatedWorld.evaluate (file:///PATH/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js:96:16) at async CdpFrame.evaluate (file:///PATH/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:336:20) at async CdpPage.evaluate (file:///PATH/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:801:20) at async configurePlugin (file:///PATH/decktape/node_modules/decktape/decktape.js:365:5)

@astefanutti
Copy link
Owner

Thanks for the report. It seems in your case there is no timer element, which is assumed to be present there:

https://github.com/astefanutti/decktape/blame/0e0a75bcf05960e5d7ecf74313755c251134fe0f/plugins/inspire.js#L19

I assume the timer plugin is not mandatory, so an easy fix would be to check if the timer element is present or not:
https://github.com/LeaVerou/inspire.js/blob/50910c3e720d3a92e3c960916a6d78cb2a5bd8b8/plugins/timer/plugin.js

I'll look into it ASAP, but I'd be very happy to accept a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants