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

Error when uninstalling last script #2957

Closed
arantius opened this Issue May 18, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@arantius
Copy link
Collaborator

arantius commented May 18, 2018

If you have only one script installed and you uninstall it (specifically, I click "uninstall" then when clicking the back arrow) you get:

 e is not a function rivets.bundled.min.js:6

A failure somewhere in the rivets templating engine. A second click on the back button works.

@arantius arantius added this to the 4.5 milestone May 18, 2018

@arantius

This comment has been minimized.

Copy link
Collaborator Author

arantius commented May 25, 2018

Update: this is "last script in a section". So if you have only one "for this tab" or "other", this happens.

@Sxderp

This comment has been minimized.

Copy link
Contributor

Sxderp commented May 29, 2018

This has to do with using rv-unless for the script sections.

<div rv-unless="userScripts.active | empty">
<heading>{'user_scripts_for_this_tab'|i18n}</heading>

<div rv-unless="userScripts.inactive | empty">
<hr rv-unless="userScripts.active | empty">
<heading>{'other_user_scripts'|i18n}</heading>

Changing the top <div>s to rv-hide solves the problem.

@arantius

This comment has been minimized.

Copy link
Collaborator Author

arantius commented May 29, 2018

I'd prefer the behavior of unless (unneeded elements are not in the DOM at all, vs. hidden via CSS). Do you know why? Unless/if should work, shouldn't they?

@Sxderp

This comment has been minimized.

Copy link
Contributor

Sxderp commented May 29, 2018

I'm not entirely sure, but this and #2963 might be related to the following:
mikeric/rivets#452 (comment)

I haven't done any testing (related to why rv-if fails) and I only just now looked up the above issue (doing a search on rv-if problems). I only thought of changing the directive because I distinctly remember this working in some mockups (never published) some time ago.

@arantius

This comment has been minimized.

Copy link
Collaborator Author

arantius commented May 29, 2018

That sure looks like a good explanation.

@arantius arantius closed this in 44d6501 May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.