I think the main issue here is that you have attempted to create two instances of a singleton and…
Brent Allen
1

Yup , I believe that’s the case, the instances are created but never returned because of the singleton; actually whichever class is instantiated, that’s the instance that’s going to be returned for all of the next instantiations.

But I feel that somehow that’s only part of the explanation as this doesn’t explain why I get different behavior based on which tool/environment I use… I mean if ES6 is interpreted/transpiled correctly, I should get the same result on all environments (which I don’t).

Ignoring the different behavior, there might be an easier way to allow for a single instance prototype… I’ll try to use a form of composition, maybe that will work better.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.