Error on RunKit Embed with minHeight without 'px' value

We used to create a RunKit Embed component from code with the value ‘500’ without specifying ‘px’, and this previously worked.
Code sample:
var notebook = RunKit.createNotebook({
element: document.getElementById(“runkit”),
minHeight: “300”
Recently the component started throwing an error:

TypeError: ""create" expects unknown for argument at position 3, but received [object Object]."

If this is a requirement, please specify in the documentation that the value must be specified in the “500px” format"

Hi @alexsnwoleo, yes sorry about that. We recently shipped a big update to embeds and as part of that we are preparing to offer a considerable amount more CSS support in the future. Unfortunately this means we had to start requiring valid CSS units. We’ll be adding this to the documentation as well as making the error more reasonable very soon (hopefully by end of today or tomorrow). Apologies for this, I’m sure it was not easy to debug.

1 Like

Hi @tolmasky. Thanks for the clarification. Yes, I got it correct only at random :slight_smile:

Hi @alexsnowleo,

Wanted to follow up on this. I just pushed an update that once again allows unitless minHeight and warns of deprecation (but automatically fixes it for you). Our goal was for this update to be essentially API equivalent, and I let this one fall through the cracks so I think it makes more sense to have it still work and warn of it failing in the future, rather than breaking the way it did, even if we were to improve the error. Apologies again and let us know if you experience any other hiccups!


1 Like

@tolmasky now everything is fine! Thank you for the quick fix!