mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Removing unnecessary if when creating shape alternates
This commit is contained in:
@@ -39,13 +39,9 @@ namespace Orchard.Widgets {
|
|||||||
widget.Classes.Add("widget-" + widgetPart.Name);
|
widget.Classes.Add("widget-" + widgetPart.Name);
|
||||||
|
|
||||||
// Widget__Name__[Name]
|
// Widget__Name__[Name]
|
||||||
if (widgetPart.Name.Contains("-")) {
|
// Replacing dashes to shape type-compatible double underscores.
|
||||||
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name.Replace("-", "__"));
|
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name.Replace("-", "__"));
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user