Skip to content

Commit

Permalink
Merge pull request #2360 from sptramer/timob-8955
Browse files Browse the repository at this point in the history
[TIMOB-8955] Set gradient page context as execution context only if available.
  • Loading branch information
Max Stepanov committed Jun 11, 2012
2 parents 3783942 + 436bed7 commit c712fd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iphone/Classes/TiGradient.m
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ +(TiGradient *)gradientFromObject:(id)value proxy:(TiProxy *)proxy
{
if ([value isKindOfClass:[NSDictionary class]])
{
TiGradient * newGradient = [[[TiGradient alloc] _initWithPageContext:[proxy executionContext]] autorelease];
id<TiEvaluator> context = ([proxy executionContext] == nil) ? [proxy pageContext] : [proxy executionContext];
TiGradient * newGradient = [[[TiGradient alloc] _initWithPageContext:context] autorelease];
[newGradient _initWithProperties:value];
return newGradient;
}
Expand Down

0 comments on commit c712fd1

Please sign in to comment.