Can-event gets broken in production if method does not exist. #1942

Closed
ilyavf opened this Issue Sep 18, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@ilyavf
Contributor

ilyavf commented Sep 18, 2015

<div can-click="nonExistingMethod"></div>

This block gets executed in development but is removed in production which causes an error in case a method does not exist.

In production because the line 206 is removed, execution goes further and line 259 scopeData.value.apply causes an exception because scopeData.value is undefined.

marshallswain added a commit that referenced this issue Sep 18, 2015

Consistent behavior between dev and production
Related to #1942.  This wraps only the dev warning in "steal-removes" so that production code behaves the same as development code when the first argument isn't available anywhere.

@daffl daffl added this to the 2.3.0 milestone Sep 29, 2015

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Sep 29, 2015

Contributor

This has been fixed via #1943

Contributor

daffl commented Sep 29, 2015

This has been fixed via #1943

@daffl daffl closed this Sep 29, 2015

marshallswain added a commit that referenced this issue Oct 22, 2015

Consistent behavior between dev and production
Related to #1942.  This wraps only the dev warning in "steal-removes" so that production code behaves the same as development code when the first argument isn't available anywhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment