Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
dcbfce81
Commit
dcbfce81
authored
Jun 04, 2020
by
yann300
Committed by
ioedeveloper
Jul 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use endsWith and startsWith
parent
713dbe30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
compiler-utils.js
apps/remix-ide/src/app/compiler/compiler-utils.js
+3
-5
No files found.
apps/remix-ide/src/app/compiler/compiler-utils.js
View file @
dcbfce81
...
@@ -11,11 +11,9 @@ export const pathToURL = {}
...
@@ -11,11 +11,9 @@ export const pathToURL = {}
* Retrieves the URL of the given compiler version
* Retrieves the URL of the given compiler version
* @param version is the version of compiler with or without 'soljson-v' prefix and .js postfix
* @param version is the version of compiler with or without 'soljson-v' prefix and .js postfix
*/
*/
export
function
urlFromVersion
(
version
)
{
// 0x959371506b8f6223d71c709ac2eb2d0158104dca2d76ca949f1662712cf0e6db
export
function
urlFromVersion
(
version
)
{
console
.
log
(
"1. orig_________= "
+
version
+
" path ="
,
pathToURL
,
" version ="
,
version
,
" and url is = "
,
pathToURL
[
version
])
if
(
!
version
.
startsWith
(
'soljson-v'
))
version
=
'soljson-v'
+
version
if
(
version
.
substr
(
0
,
9
)
!==
'soljson-v'
)
version
=
'soljson-v'
+
version
if
(
!
version
.
endsWith
(
'.js'
))
version
=
version
+
'.js'
if
(
version
.
substr
(
version
.
length
-
3
,
version
.
length
)
!==
'.js'
)
version
=
version
+
'.js;'
console
.
log
(
"2. orig_________= "
+
version
+
" path ="
,
pathToURL
,
" version ="
,
version
,
" and url is = "
,
pathToURL
[
version
])
return
`
${
pathToURL
[
version
]}
/
${
version
}
`
return
`
${
pathToURL
[
version
]}
/
${
version
}
`
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment