File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,24 +243,14 @@ impl<'a> DevupVisitor<'a> {
243243 Expression :: StaticMemberExpression ( member) => {
244244 if let Expression :: Identifier ( obj) = & member. object
245245 && let Some ( ns_map) = self . stylex_namespaces . get ( obj. name . as_str ( ) )
246- && let Some ( ns_value) = ns_map. get ( member. property . name . as_str ( ) )
246+ && let Some ( StylexNamespaceValue :: Static ( cn) ) =
247+ ns_map. get ( member. property . name . as_str ( ) )
248+ && !cn. is_empty ( )
247249 {
248- match ns_value {
249- StylexNamespaceValue :: Static ( cn) => {
250- if cn. is_empty ( ) {
251- return None ;
252- }
253- return Some ( self . ast . expression_string_literal (
254- SPAN ,
255- self . ast . atom ( cn) ,
256- None ,
257- ) ) ;
258- }
259- StylexNamespaceValue :: Dynamic ( _) => {
260- // Dynamic namespaces must be called: styles.bar(h), not styles.bar
261- return None ;
262- }
263- }
250+ return Some (
251+ self . ast
252+ . expression_string_literal ( SPAN , self . ast . atom ( cn) , None ) ,
253+ ) ;
264254 }
265255 None
266256 }
You can’t perform that action at this time.
0 commit comments