fix regression d76b383 that broke embed.js view

Close #1076