Skip to content

includes is not supported by IE. Use indexOf instead. #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions git-webui/src/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ $(function () {
}

function forceDelete(message) {
if(message.includes("git branch -D")){
if(message.indexOf("git branch -D")>-1){
$("body").append(popup);
var popupContent = $(".modal-body", popup)[0];
removeAllChildNodes(popupContent);
Expand Down Expand Up @@ -2103,7 +2103,7 @@ $(function () {
});

function upToDateHandler(message){
if(message.includes("Already up to date.")) {
if(message.indexOf("Already up to date.")>-1) {
webui.showSuccess(message);
}
}
Expand All @@ -2118,7 +2118,7 @@ $(function () {
}
webui.git("merge --abort", "", "", suppressErrorMessage);

if(message.includes("Automatic merge went well") || message.includes("Auto-merging ")){
if(message.indexOf("Automatic merge went well")>-1 || message.indexOf("Auto-merging ")>-1){
webui.git("merge "+refName, function (output){
webui.showSuccess(output);
});
Expand All @@ -2144,7 +2144,7 @@ $(function () {
function suppressErrorMessage(error) {
}
webui.git("merge --abort", "", "", suppressErrorMessage);
if(message.includes("Automatic merge went well") || message.includes("Auto-merging ")){
if(message.indexOf("Automatic merge went well")>-1 || message.indexOf("Auto-merging ")>-1){
webui.git("merge "+refName, function (output){
webui.showSuccess(output);
});
Expand Down