gnu-lorien/yorick

Removing a trait you are adding for the first time causes an exception

Opened this issue · 0 comments

s.remove_trait@https://patron.undergroundtheater.org/scripts/app/models/Character.js?bust=0.8.5 1:565
els / Approval ",".. / models / LongText "],function(e,t,n,r,i,a,o,s,c,u,_,l,p,d,h,g,m){var f=e.extend({remove_trait:function(e){var t=this;return e.destroy().then(function(){var n={alteration_spent:(e.get("
cost ")||0)*-1,reason:"
Removed "+e.get("
name ")};return t.remove(e.get("
category "),e),t.increment("
chan
child.remove@https://patron.undergroundtheater.org/scripts/app/views/SimpleTraitChangeView.js?bust=0.8.5 1:1066
) {
var a = this;
return t.preventDefault(), a.undelegateEvents(), e.mobile.loading("show"), console.log("remove value", a.category, a.simpletrait), a.character.remove_trait(a.simpletrait).fail(i).always(function() {
window.location.hash = "#simpletraits/" + a.category + "/" + a.character.id + "/all", a.delegateEvents()
}),

Steps to reproduce:

  • Go to flaws on a character
  • Click add new
  • Click Dark Secret
  • Click remove

Expected:
You return to the list of flaws

Seen:
An exception is thrown because you tried to remove a trait that was never completely added.