kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

error on fast-rendering path: /comments?clientName=TestClient&clientId=y3wwYtCwCF4KGXKgQ&threadUrl=http:/localhost/&userEmail=&userAvatar= ; error: ReferenceError: URL is not defined #121

Closed alexreich closed 9 years ago

alexreich commented 9 years ago

In the waitOn function in the route is the following line:

var clientOrigin = new URL(threadUrl).origin;

which generates this error:

error on fast-rendering path: /comments?clientName=TestClient&clientId=y3wwYtCwCF4KGXKgQ&threadUrl=http:/localhost/&userEmail=&userAvatar= ; error: ReferenceError: URL is not defined

URL is a Javascript function; is that not allowed?

Thanks!

arunoda commented 9 years ago

With FR, waitOn runs on both client and the server. That's the issue. Check this: https://github.com/meteorhacks/fast-render#3-waiton-and-subscriptions-methods