mirror of
https://github.com/typemill/typemill.git
synced 2025-01-17 05:18:19 +01:00
Version 1.4.7: Fix initial notice error
This commit is contained in:
parent
a8537f6426
commit
4d7a162290
@ -865,6 +865,13 @@ const noticeComponent = Vue.component('notice-component', {
|
||||
noticedown: function()
|
||||
{
|
||||
this.prefix = this.getNoticePrefix(this.compmarkdown);
|
||||
|
||||
/* initially it is empty string, so we add it here if user clicks downgrade button */
|
||||
if(this.prefix == '')
|
||||
{
|
||||
this.prefix = '!';
|
||||
}
|
||||
|
||||
this.prefix = this.prefix + '!';
|
||||
if(this.prefix.length > 3)
|
||||
{
|
||||
@ -876,11 +883,16 @@ const noticeComponent = Vue.component('notice-component', {
|
||||
getNoticePrefix: function(str)
|
||||
{
|
||||
var prefix = '';
|
||||
for(var i = 0; i < str.length; i++){
|
||||
if(str === undefined)
|
||||
{
|
||||
return prefix;
|
||||
}
|
||||
for(var i = 0; i < str.length; i++)
|
||||
{
|
||||
if(str[i] != '!'){ return prefix }
|
||||
prefix += '!';
|
||||
}
|
||||
return prefix;
|
||||
return prefix;
|
||||
},
|
||||
updatemarkdown: function(value)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user