Unable to filter questions with a single answer

Issue #4 resolved
Anonymous created an issue

First of, thanks for a really useful jQuery plugin, it is much appreciated.

Secondly, I just to make you aware of an issue I encountered while using your plugin. I was trying to display a StackkOverflow question with a single specific answer that is not the accepted answer. I used the following implementation: {{{

!html

<div id="stacktack-1252335" class="filterAnswers-2250309"></div> }}}

However, instead of displaying the single answer I wanted, it displayed all answers (http://www.andyparkhill.co.uk/2010/08/sending-gmail-via-powershell.html). When I tried filtering on the same question using two answer IDs, only the two specified answers were displayed, as expected. Am I incorrectly calling the plugin, or is this an issue?

Thanks, MagicAndi.

Comments (2)

  1. zamtools repo owner

    The code used parse overrides was treating a single filtered answer as a lone value, rather than an array. An explicit check has been added so that filteredAnswers are always wrapped in an array.

    The reason this was a hard error to catch was because the string generated by the single value also can be length() checked so no error was thrown when filteredAnswers wasn't an array.

  2. Log in to comment