Repository: 4ian/GDevelop
File: newIDE/app/src/AssetStore/NewObjectDialog.js (JavaScript)

Code before:
      if (installAssetOutput)
        onObjectsAddedFromAssets(installAssetOutput.createdObjects);
      return !!installAssetOutput;
    },
    [installAsset, onObjectsAddedFromAssets]
  );

  const onInstallEmptyCustomObject = React.useCallback(
    async (enumeratedObjectMetadata: EnumeratedObjectMetadata) => {
      const requiredExtensions = enumeratedObjectMetadata.requiredExtensions;
      if (!requiredExtensions) return;
      try {
        setIsAssetBeingInstalled(true);
        const requiredExtensionInstallation = await checkRequiredExtensionsUpdate(
          {
            requiredExtensions,
            project,
          }
        );
        if (
          requiredExtensionInstallation.incompatibleWithIdeExtensionShortHeaders
            .length > 0
        ) {
          showAlert({
            title: t`Could not install the asset`,
            message: t`Please upgrade the editor to the last version.`,
          });
          return null;
        }
        const shouldUpdateExtension =
          requiredExtensionInstallation.outOfDateExtensionShortHeaders.length >
            0 &&
          (await showExtensionUpdateConfirmation(
            requiredExtensionInstallation.outOfDateExtensionShortHeaders
          ));
        await installRequiredExtensions({
          requiredExtensionInstallation,
          shouldUpdateExtension,
          eventsFunctionsExtensionsState,
          project,
        });

        onCreateNewObject(enumeratedObjectMetadata.name);
      } catch (error) {
        console.error('Error while creating the object:', error);
        showAlert({
          title: t`Could not create the object`,
          message: t`There was an error while creating the object "${
            enumeratedObjectMetadata.fullName
          }". Verify your internet connection or try again later.`,
        });

Review comment (suggestion):
```suggestion
            message: t`Please upgrade the editor to the latest version.`,
```

Code after:
      if (installAssetOutput)
        onObjectsAddedFromAssets(installAssetOutput.createdObjects);
      return !!installAssetOutput;
    },
    [installAsset, onObjectsAddedFromAssets]
  );

  const onInstallEmptyCustomObject = React.useCallback(
    async (enumeratedObjectMetadata: EnumeratedObjectMetadata) => {
      const requiredExtensions = enumeratedObjectMetadata.requiredExtensions;
      if (!requiredExtensions) return;
      try {
        setIsAssetBeingInstalled(true);
        const requiredExtensionInstallation = await checkRequiredExtensionsUpdate(
          {
            requiredExtensions,
            project,
          }
        );
        if (
          requiredExtensionInstallation.incompatibleWithIdeExtensionShortHeaders
            .length > 0
        ) {
          showAlert({
            title: t`Could not install the asset`,
            message: t`Please upgrade the editor to the latest version.`,
          });
          return;
        }
        const shouldUpdateExtension =
          requiredExtensionInstallation.outOfDateExtensionShortHeaders.length >
            0 &&
          (await showExtensionUpdateConfirmation(
            requiredExtensionInstallation.outOfDateExtensionShortHeaders
          ));
        await installRequiredExtensions({
          requiredExtensionInstallation,
          shouldUpdateExtension,
          eventsFunctionsExtensionsState,
          project,
        });

        onCreateNewObject(enumeratedObjectMetadata.name);
      } catch (error) {
        console.error('Error while creating the object:', error);
        showAlert({
          title: t`Could not create the object`,
          message: t`There was an error while creating the object "${
            enumeratedObjectMetadata.fullName
          }". Verify your internet connection or try again later.`,
        });