Commit 0ac0491e authored by Theo Ballew's avatar Theo Ballew Committed by Jeroen Vreuls
Browse files

Issue #3089804 by void--, Dumitru Grosul, alphex: Don't hardcode breakpoint sets

parent 248c28a9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -268,8 +268,9 @@ function inline_responsive_images_form_editor_image_dialog_responsive_validate(a
    // choose to show the image in the editor as if it were being viewed in the
    // narrowest viewport, so that when the user starts to edit this content
    // again on a mobile device, it will work fine.
    $breakpoint_machine_names = array_keys($responsive_image_style->getKeyedImageStyleMappings()['responsive_image.viewport_sizing']);
    $image_style_mapping = $responsive_image_style->getKeyedImageStyleMappings()['responsive_image.viewport_sizing'][$breakpoint_machine_names[0]];
    $keyed_image_style_mapping = $responsive_image_style->getKeyedImageStyleMappings();
    $first_breakpoint = reset($keyed_image_style_mapping);
    $image_style_mapping = reset($first_breakpoint);

    switch ($image_style_mapping['image_mapping_type']) {
      case 'sizes':