Fixed: token field access of DOM in non-DOM apps.

Without this fix, the internal [tokenField _editorValue] would check the DOM input element even if !PLATFORM(DOM), which could potentially crash unit tests and future non DOM implementations.

The fix returns an empty string for non-DOM platforms.
This commit is contained in:
Alexander Ljungberg committed 2012-12-21 16:44:35 +00:00
1 parent 8f8f1a0224
commit 588da9addb
1 file changed
+4
+4
View File
@@ -706,7 +706,11 @@ var CPScrollDestinationNone = 0,
{
if (![self hasThemeState:CPThemeStateEditing])
return @"";
#if PLATFORM(DOM)
return [self _inputElement].value;
#else
return @"";
#endif
}
- (void)moveUp:(id)sender