Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
Changed Injector#unmap to only remove injection results instead of th…
Browse files Browse the repository at this point in the history
…e entire injectionConfig.
  • Loading branch information
tschneidereit committed Feb 9, 2010
1 parent 0cf32d6 commit 1f1d8ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/org/swiftsuspenders/Injector.as
Expand Up @@ -166,14 +166,16 @@ package org.swiftsuspenders
public function unmap(clazz : Class, named : String = "") : void
{
var requestName : String = getQualifiedClassName(clazz);
var mapping : InjectionConfig;
if (named && m_mappings[named])
{
delete Dictionary(m_mappings[named])[requestName];
mapping = Dictionary(m_mappings[named])[requestName];
}
else
{
delete m_mappings[requestName];
mapping = m_mappings[requestName];
}
mapping.setResult(null);
}

public function createChildInjector() : Injector
Expand Down

0 comments on commit 1f1d8ec

Please sign in to comment.