sxoinas12 преди 5 години
родител
ревизия
0bbb0b360d
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      Components/ActionEditor.js

+ 2 - 1
Components/ActionEditor.js

@@ -3,14 +3,15 @@ import { View, Text, TextInput, StyleSheet } from 'react-native';
 import InjectionSystem from 'trapilib/dist/lib/systems/InjectionSystem';
 import { Picker } from 'react-native';
 
-const ActionSystem = InjectionSystem.inject('Actions')
 
 export default function ActionEditor(props) {
 	let [action, setAction] = useState(props.value || {});
 
+	let ActionSystem = InjectionSystem.inject('Actions');
 	let RoutingSystem = InjectionSystem.inject('Routing');
 	let Routes = RoutingSystem.topology.nodes
 	if (!action.data || typeof action.data !== "object") action.data = {};
+	console.log(ActionSystem)
 	if (!action.type) action.type = ActionSystem.constructor.Actions[0].id
 	return (
 		<View style={styles.container}>