tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <j...@apache.org>
Subject [jira] Closed: (TAP5-555) Tapestry.ScriptManager.contains throws error if <script> tag in <head> has no href
Date Thu, 05 Mar 2009 17:23:56 GMT

     [ https://issues.apache.org/jira/browse/TAP5-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Howard M. Lewis Ship closed TAP5-555.

       Resolution: Fixed
    Fix Version/s:

> Tapestry.ScriptManager.contains throws error if <script> tag in <head> has
no href
> ----------------------------------------------------------------------------------
>                 Key: TAP5-555
>                 URL: https://issues.apache.org/jira/browse/TAP5-555
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.18
>            Reporter: Raul Montes
>            Assignee: Howard M. Lewis Ship
>             Fix For:
> Tapestry.ScriptManager.contains firsts lines are:
> return $A(collection).any(function (element)
> {
>      var existing = element[prop];
>      if (existing.blank()) return false;
> If element doesn't have the prop, then the existing var is null and existing.blank()
throws an exception because the call of a method to a null variable. This problem happens
for example (because of this i detected it) when i want to update a zone with a block that
also loads stylesheets and scripts and, in the original page, there are script and or style
tags embedded (<style> without href or <script> without src). In the loop looking
for an existing script or style tag that had already loaded the new script or tag in the ajax
response, the existing variable in the code is null and the error triggers.
> The solution is very simple, i think:
> if (existing == null || existing.blank()) return false;
> Regards.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message